Help with a little something...

EagleoneEagleone Member Posts: 97
edited December 2011 in Working with GS (Mac)
Hi,

I have 2 actors (actor A and actor B). Once actor A is touched actor B appears on the screen. Got that working no problem. But how do I make it so this can only happen once? Right now, if I restart the scene and touch actor A again, actor B will appear again. So basically if I re-play that scene and touch actor A, I don't want actor B to appear again.

I hope this explanation has made sense.

Thanks!

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    How about making a game attribute "actorBVisible". Make it an integer attribute.

    In your touch rule for actor A add another condition that tests if actorBVisible = 0

    When actor A is touched and when actorBVisible = 0 then
    spawn Actor B
    set "actorBVisible" to 1

    (Actor B will now only show up once.)

    Hope that helps!
    RThurman
  • EagleoneEagleone Member Posts: 97
    edited December 2011
    Thanks RThurman and TB.

    TB: I already tried this method, however, I can't change game.buttonactive to false, because this will effect one of my other scenes. This needs to stay as true.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    then you just make a seperate attribute and do that
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    I made a small demo which may help:

    http://speedy.sh/ABvWw/SelectiveSpawn.zip
  • EagleoneEagleone Member Posts: 97
    RThurman, thank you very much for that. Will look at it now!
Sign In or Register to comment.