### Author Topic: [Scripts] creating barrier that targets remotes and orbits around you  (Read 512 times)

0 Members and 1 Guest are viewing this topic.

#### Phearcia ##### creating barrier that targets remotes and orbits around you
« on: September 06, 2016, 10:33:12 AM »
This code is really cool. Especially when you have a display intersect circle command.

Var (pi) = (3.1415926)

Var (vectorX) = 50 + (pos:x)
Var (vectorZ) = 50 + (pos:z)

Var (degrees) = (radians) * (180) / (Pi)

Var (x) = (vectorX) * (cos:rad) + (pos:x) + (number equals length)
Var (y) = (pos:Y) + (1)
Var (z) = (VectorZ) * (sin:rad) + (pos:z) + (number equals length)

Loop (20)

Var (x) (y) (z)

If
Intersect (I used sphere) (x,y,z) (.5) (display)
Then
Script desired effect

#### Phearcia ##### Re: creating barrier that targets remotes and orbits around you
« Reply #1 on: September 07, 2016, 01:59:52 AM »
Radians +1.6 will make 4 orbs, 2.15 will make 2, 3.17 will make three orbs, 5 will make 5 orbs, and 6.25 will make one orb. I also noticed you can make them go in reverse by using just decimal numbers.