Date: 2014/02/12 17:47:46 UTC-08:00
Type: Denizen Script
# | 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:<context.location> 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 <def[location].find.players.within[10].get[1]> != null {
- attack <def[location].find.living_entities.within[5].get[1]> target:<def[location].find.players.within[10].get[1]>
}