TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ PickEmote()

virtual ? int Terraria.ModLoader.ModNPC.PickEmote ( Player closestPlayer,
List< int > emoteList,
WorldUIAnchor otherAnchor )
inlinevirtual

Allows you to change the emote that the NPC will pick.

Parameters
closestPlayerThe T:Terraria.Player closest to the NPC. You can check the biome the player is in and let the NPC pick the emote that corresponds to the biome.
emoteListA list of emote IDs from which the NPC will randomly select one
otherAnchorA T:Terraria.GameContent.UI.WorldUIAnchor instance that indicates the target of this emote conversation. Use this to get the instance of the P:Terraria.ModLoader.ModNPC.NPC or T:Terraria.Player this NPC is talking to.
Returns
Return null to use vanilla mechanic (pick one from the list), otherwise pick the emote by the returned ID. Returning -1 will prevent the emote from being used. Returns null by default

Definition at line 116 of file ModNPC.cs.

117 {
118 return null;
119 }