on getPropertyDescriptionList
set p_list = [#pSun: [ #comment: "Origin of orbit (sprite #):", #format: #integer, #default: 1 ] , #pSpeed: [ #comment: "Speed", #format: #integer, #default: 1 ] ]
return p_list
end
on getBehaviorDescription
return "written by Katsumi Ishida. (C) 1997/09/19 Katsumi Ishida"
end
on beginSprite me
set sp = the spriteNum of me
set pRadian = 0.0
set xy = the loc of sprite sp - the loc of sprite pSun
set xy = xy * xy
set pRadius = sqrt( the locH of xy + the locV of xy )
set p2PI = 2 * pi()
puppetSprite sp, true
end
on endSprite me
set sp = the spriteNum of me
puppetSprite sp, false
set pRadian = void
set pRadius = void
set p2PI = void
end
on exitFrame me
set sp = the spriteNum of me
set pRadian = pRadian + pSpeed * 0.1
if (p2PI < pRadian) then set pRadian = pRadian - p2PI
set Sun2Planet = point( pRadius * cos( pRadian ), pRadius * sin( pRadian ) )
set the loc of sprite sp = Sun2Planet + the loc of sprite pSun
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA