Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
sound volum
myBackGround
ColorCursor
Install Maker
NJC - Space Invaders
keyboard input control
Buddy Zip/Unzip
GkSetup
GetPixelColour
Macromedia Director 7 - Illustrated Complete
MediaMacros Xtras Mall
 

 

 

Behavior Orbiter

Added on 6/7/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: RenfieldFeinstein

The Orbital Behavor as hacked by Renfield ren@core-ad.co.jp with respect to flat earth communications

property spriteNum
property orbitSpeed, originH, originV, radiusH, radiusV, originType, originSprite

--======  The Set Up:

on idle me
  checkOrigin me
  orbit me
  updateStage
end

on exitFrame me
  checkOrigin me
  orbit me
end



--======  Making Biscuits:

on checkOrigin me
  case (originType) of
    "mouse": mouseOrigin me
    "sprite": spriteOrigin me
  end case
end

on mouseOrigin me
  set originH = the mouseh
  set originV = the mousev
end

on spriteOrigin
  set originH = the loch of sprite originSprite
  set originV = the locv of sprite originSprite
end


on orbit me
  set counter to the ticks
  set the loch of sprite spriteNum  = originH + radiusH * cos(counter/orbitSpeed)
  set the locv of sprite spriteNum  = originV +radiusV * sin(counter/orbitSpeed)
end

--======  Behavior Handlers:

on getPropertyDescriptionList me
  set theProps to [:]
  
  set c to "What"s the orbit speed?"
  set f to #float
  set d to 50.00
  addProp theProps, #orbitSpeed, [#comment: c, #format: f, #default: d]
  
  set c to "What"s the origin?"
  set f to #string
  set r to ["point", "mouse", "sprite"]
  set d to getAt(r,1)
  set typeProps to [#comment: c, #format: f, #range: r, #default: d]
  addProp theProps, #originType, typeProps
  
  set c to "If origin is a sprite, who?"
  set f to #integer
  set d to 1
  addProp theProps, #originSprite, [#comment: c, #format: f, #default: d]
  
  set c to "If origin is a point, what"s H?"
  set f to #integer
  set d to 100
  addProp theProps, #originH, [#comment: c, #format: f, #default: d]
  
  set c to "if origin is a point,what"s V?"
  set f to #integer
  set d to 100
  addProp theProps, #originV, [#comment: c, #format: f, #default: d]
  
  
  set c to "What"s the H radius?"
  set f to #integer
  set d to 30
  addProp theProps, #radiusH, [#comment: c, #format: f, #default: d]
  
  set c to "What"s the V radius?"
  set f to #integer
  set d to 30
  addProp theProps, #radiusV, [#comment: c, #format: f, #default: d]
  
  return theProps
end


on getBehaviorDescription me
  set line1 to " Make an orbiter" & RETURN
  return line1
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