platform regeneration

Hello,

I have a question about platforms. Basically I want to make a game that includes a single set of platforms that the character walks on. During the game the platforms will be hit with falling objects and eventually destroyed. My question is how can I create a button that will respawn the platforms after they have been destroyed.

Any advice on this would be much appreciated.

Thanks

Best Answer

  • Bonan999gamesBonan999games Posts: 5
    edited October 2013 Accepted Answer
    If i understand you, you want the platforms back to their starting position when you click a button. If thats the case, in the platform actor you make two integer attributes, startX and startY. Then you make two "Change Attributes" to change self.startX/self.startY to self.PositionX/self.Position.Y . Then you make a Boolean attribute in game attributes, call it "buttonClicked". In the button actor make a RULE to record when touch is pressed, when touch is pressed change button clicked to true and otherwise change it to false. Then go to the platform actor and make a RULE that records when buttonClicked is true, when buttonClicked is true change self.Position.X to startX AND self.Position.Y to startY.
    There you go, hope it helped!:)

    https://www.dropbox.com/s/41t6znip9pjexsh/PlatformReset.gameproj.zip

    Bonan99Games

Answers

Sign In or Register to comment.