Paste #11555: Untitled Paste

Date: 2014/11/26 22:53:21 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17


pong ball:
  type: task
  script:
  - ^define startlocation <server.flag[ball].as_entity.location>

  - ^spawn e@falling_block %startlocation% save:ball

  - ^push <entry[ball].spawned_entities.get[1]> d:<server.flag[direction].add[0,0,<server.flag[direction].z.mul[-20]>]> speed:0.5 d:10s 'script:pong ball'
  - ^flag server ball:<entry[ball].spawned_entities.get[1]>
  - ^remove <server.flag[ball]>
  - ^flag server direction:<server.flag[ball].as_entity.location.add[<server.flag[ball].as_entity.location.direction.vector.mul[1]>]>
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'