# | Handles the world event for entity spawning and fires @KillPlayer_Task KillPlayer_World: type: world events: on entity spawns: # Run the attack script precisely one tick from now. - run KillPlayer_Task def: delay:1t # | Causes the entity at %location% to attack the nearest player KillPlayer_Task: type: task definitions: location script: # If there is a player nearby, attack! - if != null { - attack target: }