Saving the fact that an actor was destroyed?

TheMenOfHonorTheMenOfHonor Member Posts: 147
edited March 2012 in Working with GS (Mac)
Hello fellow GameSalad devs, I have a quick question.

I set up a room that has a green button, once you press the green button, it destroys itself and spawns
a blue button near it. This works perfect, but when I leave the room and come back, it resets
itself showing a green button, and no blue button to be found.

I tried using variables to set this, so if the variable was true, it would delete the green button and spawn
the blue one, but this happens quickly AFTER you get into the room. This means that you get a glimpse of
the green button before it disappears, and then you see the blue button appear after a split of a second.

How do I make it so that the blue button never disappears after it is spawned, and the green button never comes back?
Thank you.

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    You can't save a behavior, but you can attach that behavior to a boolean attribute, and save that.

    So you need to save that attribute that says when it's true to destroy the button and spawn the other one, and then in the other scene, make sure the load attribute is at the very top of your scene loading.
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    "Saving the fact that an actor was destroyed?"
    Sometimes just a simple bunch of flowers left on the coordinates of where the actor was killed is enough.





    @};- @};- @};-
    @};- @};- @};-
    @};- @};- @};-
  • MotherHooseMotherHoose Member Posts: 2,456
    edited March 2012
    one boolean gameAttribute

    one button … just changeAttributes: self.Image and self.Position.X (or Y)
    … if the button size changes with image … you just add the behaviors for that
    no destroy; no spawn

    demo:  http://www.mediafire.com/?qvoa8669wae6z9d

    @};- MH
Sign In or Register to comment.