--SCRIPT ORBITAL CLASS2

property myType
property mySprite
property myRadius
property myAngle
property MyFactor
property myIncrement

on new me,channelnum
add the actorlist, me
set myIncrement=random(30)*.001559876
set z =random(2)
if Z > 1 then set myIncrement=myIncrement*-1
set mySprite=channelnum
puppetSprite mySprite, TRUE
set the loch of sprite mysprite = -400
set myType=#Orbital
set myRadius=3.35*channelnum
set myAngle=(random(6)/3.0)*pi()
set MyFactor = 1.0001
end new


on stepFrame me
orbit me
move me
end stepFrame


on move me
set myAngle=myAngle+myIncrement
if mysprite > 2 then
set tempH= the loch of sprite (mysprite-1)
set tempV= the locV of sprite (mysprite-1)
else
set tempH= 160.00
set tempV=160.00
end if
set the locH of sprite mySprite to tempH+cos(myAngle)*myRadius
set the locV of sprite mySprite to tempV+sin(myAngle)*myRadius
end move


on orbit me
set myRadius=myRadius*MyFactor
if myRadius > 160-mysprite*10 then
set MyFactor = 0.9999
end if
if myRadius < mysprite*10 then
set MyFactor = 1.0001
end if
end orbit