Paste #11149: Edit of P#11142 - Edit of P#11140 - Untitled Paste

Date: 2014/11/10 16:37:24 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


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'