LateStart¶
LateStart is a method that is only called on the first LateUpdate cycle of the entity. This is tracked using the setup
field which is only set to true at the end of this method.
- Check the tag of the entity
- For
Follower
,PFollower
,Player
,NPC
andEnemy
,movesmoke
is initialised unless it is an item. Either way, theanim
's cullingMode is set to CullCompletely which disabled animations when not visible - For
Follower
andPFollower
, CreateDetector is called with a size of (0.0, 0.7, 0.3) and a center of (0.0, 0.5, 0.65). Collisions betweendetect
and thefollowing
entity are ignored before settingisfollower
to true. - For
Player
,isplayer
is set to true and CreateShield called if it is the battle entity version of the player which initializesbubbleshield
if it hasn't been already
- For
- If it's an item entity, set
overrideanim
andoverrridejump
as well asoldstate
to -1 (None
) and callCreateFeet
which will initialisefeet
and set this entity as its parent - Set
originalmap
to the current map - If there is an
npcdata
- Set
npcdata
'scurrentdialogueindex
to NPCControl.GetDialogueIndex which is a very cut down version of GetDialogue that only supportsnpcdata.overridediag
and will only return the first applicable dialogue line id or -1 if none applied - If the map entity is a PushRock with
internalcollider
present, ensurefeet
is initialised and callCreateFeet
if not while also ignoring all collisions betweenfeet
and eachinternalcollider
- Set
- If by this point,
feet
hasn't been initialised and the entity is aFollower
,PFollower
,isplayer
,NPC
,Enemy
or annpcdata
of type PushRock or Item,CreateFeet
is called - Set the
transform
's position tostartpos
if it was assigned before or setstartpos
to thetransform
's position if it wasn't - Set
startbf
,startbs
andtruescale
tobobrange
,bobspeed
andstartscale
respectively - Call UpdateMoveSmoke
- Set
oldstate
to -1 (None) - Set
setup
to true which will prevent the game from calling this method again for this entity