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

◆ CanTalk

bool Terraria.NPC.CanTalk
get

Definition at line 1324 of file NPC.cs.

1325 {
1326 get
1327 {
1328 if (isLikeATownNPC && aiStyle == 7 && velocity.Y == 0f)
1329 {
1330 return !NPCID.Sets.IsTownPet[type];
1331 }
1332 return false;
1333 }
1334 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
static bool[] IsTownPet
If true for a given NPC type (F:Terraria.NPC.type), then that NPC is categorized as a town pet....
Definition NPCID.cs:224
int aiStyle
Selects which vanilla code to use for the AI method. Vanilla NPC AI styles are enumerated in the T:Te...
Definition NPC.cs:1013
bool isLikeATownNPC
Definition NPC.cs:1529
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
Definition NPC.cs:990

Referenced by Terraria.NPC.AI_007_TownEntities(), and Terraria.NPC.VanillaFindFrame().