Falling Objects

knarovichknarovich Member Posts: 2
edited June 2012 in Working with GS (Mac)
I am trying to make a game where objects are falling from the top of the screen to the bottom. I am having a hard time making objects do this. Could someone please help me??

Thank you

Best Answer

  • DanDaMan123DanDaMan123 Posts: 216
    Accepted Answer
    What you could do is make it so that the objects have a behavior to make them fall, like move, accelerate, scene gravity, etc. Then, in the scene that you want them to fall, you would have an actor that spawns these obstacles. Assuming that you don't want the objects all falling from the same spot, in the 'spawn actor' behavior you could specify that it spawns the actors x position with a randomizer.

Answers

  • knarovichknarovich Member Posts: 2
    Thanks for the info Dan. It should help me. I am trying to create something where an object falls from the sky, and there is something catching them at the bottom. I am still trying to figure out how to make the falling object keep appearing from the sky in different locations though. Any thoughts?
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    You can use the random function to pick random X locations across the top of the screen when you are spawning the falling objects.

    Jamie
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    When you spawn your falling object do this:

    Change Attribute Behavior
    -Change Attribute "self.Postion.X" to "random(0,1024)"

    The "0" and "1024" are your minimum and maximum possible X values.

    Jamie
Sign In or Register to comment.