I'm a beginner and I don't understand how cuboid works, below is my code (test code)
`my_area:
type: cuboid
world: world
min: -10,60,-10
max: 10,70,10
player_exit_area_script:
type: world
events:
on player exits my_area:
- flag player outside_area:true
- run timer_script
player_enter_area_script:
type: world
events:
on player enters my_area:
- flag player outside_area:false
- queue clear timer_script
timer_script:
type: task
script:
- define time 0
- while <player.has_flag[outside_area]>:
- wait 1s
- define time <[time].add[1]>
- if <[time]> >= 10:
- narrate "You have been out of the area for too long!"
- teleport <player> <location[0,65,0,world]>
- flag player outside_area:false
- stop`