tModLoader Hello, I'm trying to do some mod staff for terraria and need help

ScoutM1

Terrarian
I haven't seen anything about it, but im trying to do some similar stuff like ako sugar from sekiro, I've done sugar and buff, but how do i make custom text/message(like red sign when you use sugar in sekiro) appear above players head(not in the chat) when item is used. If somebody could help i would be very thankful!
 
did smt like that recently
C#:
Rectangle textPos = new Rectangle((int)player.position.X, (int)player.position.Y - 20, player.width, player.height);
                            CombatText.NewText(textPos, new Color(255, 0, 0), "Parry!", true, false);
 
did smt like that recently
C#:
Rectangle textPos = new Rectangle((int)player.position.X, (int)player.position.Y - 20, player.width, player.height);
                            CombatText.NewText(textPos, new Color(255, 0, 0), "Parry!", true, false);
Yes yes yes, thank you. I spend like week to figure it out, because i don't really know c#.
 
Btw here is this part of code:
public override bool? UseItem(Player player)
{

if (player.whoAmI == Main.myPlayer)
{

Rectangle textPos = new Rectangle((int)player.position.X, (int)player.position.Y - 20, player.width, player.height);


CombatText.NewText(textPos, new Color(255, 0, 0), "DEFENSE!", true, false);
}

return true;
}
 
Back
Top Bottom