Need help with making my player reappear

feromanferoman Member, PRO Posts: 130
edited July 2012 in Working with GS (Mac)
In my game, I would like my player is hidden in a pot or barrel (an object).
my player is logically destroyed, when in contact with an object such as the pot.

But how to get it back (take it out of the pot), because my player is previously destroyed.

He must have a solution to my problem.

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Instead of destroying that actor, just change its positon off the screen. Then call it back when needed.
  • ironDanironDan Member Posts: 148
    Like @Braydon_SFX said and to expand on just create 2 (Real) self attributes SelfX and SelfY and then 2 change attributes change SelfX to self.positionX and SelfY to self.positionY and then fire off a rule that states when actor is to be hidden change SelfX and SelfY to self.positionX and self.positionY and then change self.positionX to a position off screen and then a rule that says when the actor is to return to change self.positionX to SelfX and self.positionY to SelfY.

    Or you can just create a self attribute (boolean) called Active. create a rule that says when Active is false change self.color.alpha to zero and when True change self.color.alpha to 1. As well as if there are any movement or sounds etc to be on/off depending on Active state. Then fire off a rule that says when actor is to be hidden to change self.active to true and false when the actor is to return.
Sign In or Register to comment.