randomly spawned platforms.

Pennez-GamesPennez-Games Member Posts: 107
edited July 2012 in Working with GS (Mac)
hi i am making a game where platforms come up from the bottom of the bottom of the screen up to the top, but the question is, how do i make them randomly spawn below the bottom of the screen so they come up onto the screen, and when they go off the top of the screen they disapear? can someone please help me. thanks!

Answers

  • AcceleratedGamesAcceleratedGames Member Posts: 201
    Have an actor at the bottom of the scene that spawns the platform at self.Position.Y for the Y position and random(0,game.Screen.Size.Width) for the X position and make that relative to the actor. Then have this rule: If self.Position.Y > game.Screen.Size.Width+(self.Size.Hight/2), then destroy.
Sign In or Register to comment.