Checkpoint
Tip
This event is available on server-side only
This event is called each time entity enters or leaves a checkpoint.
Parameter | Description |
---|---|
checkpoint | Checkpoint which was entered/leaved. |
entity | Entity which entered/leaved the checkpoint. |
state | True if entity entered colshape, false if left. |
Normal event handler
Alt.OnCheckpoint += (checkpoint, entity, state) => {
// ...
}
Attribute event handler
Warning
Attribute event handlers only work in Scripts, or after executing Alt.RegisterEvents on a class instance.
For more info see: Create script
public class MyScript : IScript
{
[ScriptEvent(ScriptEventType.Checkpoint)]
public void OnCheckpoint(ICheckpoint checkpoint, IEntity entity, bool state)
{
// ...
}
}