|
TModLoader v1.4.4.9
TModLoader source code documentation
|
| int Terraria.NPC.aiStyle |
Selects which vanilla code to use for the AI method. Vanilla NPC AI styles are enumerated in the T:Terraria.ID.NPCAIStyleID class. Modders can use vanilla aiStyle and optionally P:Terraria.ModLoader.ModNPC.AIType to mimic AI code already in the game. This is usually only useful as a prototyping tool since it is difficult to customize existing aiStyle code. See P:Terraria.ModLoader.ModNPC.AIType and PartyZombieto see how to use vanilla ai. If you are using custom AI code, there is no need to set this field.
Customizing an existing aiStyle usually requires following the Vanilla Code Adaption Guide.
If you are using completely custom AI, set this to -1 since an aiStyle of 0 will face the player automatically, which may interfere with your logic.
Defaults to 0.
Definition at line 1013 of file NPC.cs.
Referenced by Terraria.NPC.AI_006_Worms(), Terraria.NPC.AI_037_Destroyer(), Terraria.GameContent.CoinLossRevengeSystem.CacheEnemy(), Terraria.NPC.CheckActive_WormSegments(), Terraria.NPC.SetDefaults(), Terraria.NPC.VanillaAI_Inner(), and Terraria.NPC.VanillaFindFrame().