ChasePlayer¶
Approach the player as close as possible within the radiuslimit or until there is no more ground to move in the direction of the player.
Frequency meaning¶
None, overriden to 2.0 if it's not between 0.0 and 10.0 inclusive.
Additionaldata¶
radiuslimit: The max radius in which the entity is allowed to move in.
DoBehavior¶
- If
returntoheightis true, entity.heightis set to a lerp from the existing one to entity.initialheightwith a factor of 0.1 - entity.
spriteis enabled - entity.
forcemoveis set to false - FaceTowards is called on the entity with the player position as the facing point
- entity.
emoticonidis set to 2 (!) and entity.emoticoncooldownis set to 2.0 - If HasGroundAhead returns true on the entity, Move is called on the entity to move it to the player position with the
speedmultiplierspeed and theChaseanimstate. Otherwise, StopForceMove is called - entity.
oldstateand entity.oldflyis set to -1 (this forces a sprite update) - The animstate is set to
Chase - The position is limited to a radius of
radiuslimitwhere the center isstartposignoring the y component
Update (Common end logic)¶
If this is the current behavior (according to inrange) and we are in minipause or inevent, then StopForceMove is called on the entity.