You should be able to, I guess.so, servers only work on windows? like, if someone is hosting a server on windows, i could not join on a mac?
You could try checking the tile's frame, using the frameX and frameY fields in Tile. They represent the coordinates on the tile's spritesheet that the tile is using.I'm having trouble with the ModTile class, I want a particle to spawn at a specific location rather than on all of the tiles at once. (For example in a 3x3 tile) The PostDraw method will draw particles on all 9 tiles, iterating through them with coordinates i and j. What I have right now is an if statement that will modify the location of the particle's vector2 so that it will stay in the same tile all the time, based on how many cycles it iterated through. Here's a rough example of what I have:
Now this code works perfectly if there is only one of these 3x3 tiles on the world. The moment I put more, they go all over the place. I think the problem is that the cycle integer is actually a static field shared by all of the tiles in the world, but how do I go fixing that?Code://in the class scope int cycle = 1; //in the postdraw method Vector2 dustLoc = new Vector2(i,j); //initializes dustLoc float tilesize = 1f; if(cycle <= 9) //iterates through the 9 tiles { float xOffset = (((cycle + 2) % 3) * tilesize); float yOffset = (((cycle - 1) / 3) * tilesize); dustLoc = new Vector2(i + 1.1f - xOffset, j + 0.4f - yOffset); cycle++; if(cycle == 10) { cycle = 1; } } int dust = Dust.NewDust(dustLoc * 16f, 0, 0, mod.DustType("Spark")); //creates the particle
Anyone can join any server that is hosted. It's just that only Windows can host servers. For example, a Mac player can join a Windows server, but a Mac player can't host a server.so, servers only work on windows? like, if someone is hosting a server on windows, i could not join on a mac?
Hm, item.rare should affect it. Does that not work for you?You should be able to, I guess.
About tModLoader. How do I change item pickup text color? I guess item.rare doesn't affect it.
By installing it again. "Installing" in this case is just copying files (which the installer jar does for you).how do i update the tmodloader
It doesn't. My custom item's rarity is '-12' (Rainbow), and it correct displays in inventory. But when I pickup my item, the text is white.Hm, item.rare should affect it. Does that not work for you?
Oh, that rainbow rarity is a weird one. Absolutely nothing in-game uses it. I wouldn't recommend using that rarity. To get the rainbow color, you'll want to either set item.expert to true, or wait for more UI support.It doesn't. My custom item's rarity is '-12' (Rainbow), and it correct displays in inventory. But when I pickup my item, the text is white.
sweet. you should probably change the main post then, it says 'servers currently only work on windows' which can be misleadingAnyone can join any server that is hosted. It's just that only Windows can host servers. For example, a Mac player can join a Windows server, but a Mac player can't host a server.
You know what, you're right.sweet. you should probably change the main post then, it says 'servers currently only work on windows' which can be misleading
I totally forgot about item.expert. Thank you.Oh, that rainbow rarity is a weird one. Absolutely nothing in-game uses it. I wouldn't recommend using that rarity. To get the rainbow color, you'll want to either set item.expert to true, or wait for more UI support.
This is done in the Shoot method of the weapon that shoots the projectile. Basically, raise the y position up and rotate the speed x and y to aim towards the cursor using geometry.I totally forgot about item.expert. Thank you.
And I've got another question. How do I do a projectile that falls down like Daedauls Storm Bow's arrows, but single?
If you clone the AI of a vanilla pet, it is super easy: See ExamplePet (Projectile, Item, Buff, and the bool in the ExamplePlayer)How do I make pets?
public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
{
if(currentAmmo > 0 )
{
for(int i=0; i<currentAmmo; i++)
{
float drawX = Main.screenPosition.X + Main.mouseX + 8f*i - 8f*currentAmmo/2;
float drawY = Main.screenPosition.Y + Main.mouseY + 20f;
spriteBatch.Draw(mod.GetTexture("UI/AmmoShotgun"), new Vector2(drawX,drawY), null, drawColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
//Dust.NewDust(new Vector2(drawX,drawY), 10, 10, 6);
}
}
}
how do i make a NPC spawn in underground jungle?
public override float CanSpawn(NPCSpawnInfo spawnInfo)
{
return spawnInfo.spawnTileY > Main.rockLayer && spawnInfo.player.ZoneJungle ? 0.5f : 0f;
}
Please don't post messages like this, they won't get your question answered any quicker. Patience is a virtue.hello