Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
NetDone() not registering in IE on the Mac
RearWindow Professional
Fuel
Imaging Lingo Basics
Shocksites.com
Slow Searches - Valentina
Noise Algorithm 2
Mac Drive
RADMSAgent
Open MIAW
MediaMacros Xtras Mall
 

 

 

Behavior Planet Orbiter

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: KatsumiIshida

Planet Orbiter

property pSun
property pSpeed
property pRadian
property pRadius
property p2PI

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

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail