Trigger colliders handing¶
PlayerControl has an OnTriggerStay and OnTriggerExit. They only react to collision whose GameObject have a specific tag.
OnTriggerStay¶
What happens here depends on the collider's tag (if it's not mentioned here, nothing happens).
Pusher or PPusher¶
Only applies if the player isn't flying otherwise, nothing happens:
- entity.ongroundis set to false
- If entity.rigidy velocity is above 0.0, it is set to 0.0
- MainManager.PushAway is called to push the player away from the collider's transform by 0.05 with the direction being from the collider's transform to the player
Respawn¶
- If the collider's GameOject has an NPCControl with a vectordata[0].magnitude above 0.1 (meaning this is a SetPlayerRespawn and its respawn position is defined):- lastposis set to the NPCControl's- vectordata[0]which is the respawn point
 
- Otherwise (this is a respawner, but not a SetPlayerRespawn), if entity is onground:- respawncountis increased by- framestep
- If respawncountreaches above 15.0 (so more than 15.0 frames in that collider), it is reset to 0.0 withlastposset to the current player position
 
Conveyor¶
- If the conveyoris the other collider's transform:- If MainManager.FreePlayer is true (not in a pause,minipause,inevent, the message lock is released and the player isn'tdiggingorflying), the player position is increased by theconveyor's StaticModelAnim'sconveyor*framestep. Basically, the player will move towards the direction set in the StaticModelAnim as long as it keeps colliding with it
 
- If MainManager.FreePlayer is true (not in a 
- Otherwise (conveyoris null):- conveyoris set to the other collider's GameObject's StaticModelAnim
 
KeepDig¶
The only thing that happens is keepdig is set to 5.0.
OnTriggerExit¶
What happens here depends on the collider's tag (if it's not part of the following, nothing happens):
- Conveyor:- conveyoris set to null
- KeepDig:- keepdigis reset to 0.0
- Respawn:- respawncountis reset to 0.0