Paste #34312: Untitled Paste

Date: 2016/06/16 21:59:14 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11


GenerateOrbitalParticles:
  type: task
  definitions: effect|center|radius|amount|orbitals|velocity|yRot
  script:
  - define locations li@
  - define angularVelocity <def[velocity].to_radians||0.04>
  - repeat <def[amount]||10>:
    - define angle <def[angularVelocity].mul[<def[value]>]>
    - repeat <def[orbitals]||3>:
      - define locations <def[locations].include[<def[center].sub[<location[<def[angle].cos>,<def[angle].sin>,0].mul[<def[radius]||3>].rotate_around_x[<util.pi.div[<def[orbitals]||3>].mul[<def[value]>]>].rotate_around_y[<def[yRot]||0>]>]>]>
  - playeffect <def[effect]> <def[locations]>