|
TModLoader v1.4.4.9
TModLoader source code documentation
|
|
static |
If != -1 for a given NPC type (F:Terraria.NPC.type), then that NPC will store its past positions (and potentially more) for use in a trail.
A value of 0 will store the NPC's position in F:Terraria.NPC.oldPos every three frames. Vanilla automatically uses F:Terraria.NPC.localAI[3] to count frames for this, so make sure your code doesn't interfere with that.
A value of 1, 5, or 6 will store the NPC's position in F:Terraria.NPC.oldPos every frame.
A value of 2 will store the NPC's position and rotation in F:Terraria.NPC.oldPos and F:Terraria.NPC.oldRot respectively every frame if F:Terraria.NPC.ai[0] == 4 or 5 or 6.
A value of 3 or 7 will store the NPC's position and rotation in F:Terraria.NPC.oldPos and F:Terraria.NPC.oldRot respectively every frame.
A value of 4 will store the NPC's position in F:Terraria.NPC.oldPos every frame, as well as creating light (0x4D0033) at the NPC's position.
Other values will do nothing.
Vanilla will not automatically draw trails for you.
Defaults to -1.
The length of an NPC's trail is determined by F:Terraria.ID.NPCID.Sets.TrailCacheLength.
Definition at line 277 of file NPCID.cs.
Referenced by Terraria.ID.NPCID.Sets.Sets(), Terraria.GameContent.Bestiary.UnlockableNPCEntryIcon.Update(), and Terraria.NPC.UpdateNPC_UpdateTrails().