Date: 2014/11/10 16:37:24 UTC-08:00
Type: Denizen Script
pong ball:
type: task
script:
- ^define startlocation <server.flag[ball].as_entity.location>
- ^remove <server.flag[ball]>
- ^spawn e@falling_block %startlocation% save:ball
- ^flag server ball:<entry[ball].spawned_entities.get[1]>
- ^define direction <server.flag[ball].as_entity.location.add[<server.flag[ball].as_entity.location.direction.vector.mul[1]>]>
- ^push <server.flag[ball].as_entity> d:<def[direction].add[0,0,<def[direction].z.mul[-20]>]> speed:0.5 d:10s 'script:pong ball'
- flag server balldirection:%direction%
pong start:
type: task
script:
- ^spawn e@falling_block save:ball
- ^flag server ball:<entry[ball].spawned_entities.get[1]>
- push <server.flag[ball]> d:<player.location.add[1,1,100]> speed:2 d:10s 'script:pong ball'