Scene Change on Conditions

Is it possible to change a scene if a number of conditions are met? For instance if all the enemy actors in the scene are destroyed, it changes to one scene, and if they aren't it goes to a different one. I don't want to use a button for this because it won't work with the game play.

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    edited April 2013
    Yes, through attributes, you can change a scene on any type of event you choose. Wether a score has been met, or a time limit, or certain amount of objects touched/destroyed/found, etc...

    You may want to watch through some of the videos that are available for teaching the functions of GameSalad if you have not already. Give these a look through.

    And welcome to the community!

    http://www.youtube.com/user/GameSaladCookbook/videos
    http://www.gshelper.com
  • Micala42Micala42 Member Posts: 3
    Thank you so much! You're fast response is a Godsend! This is due tomorrow!
  • Micala42Micala42 Member Posts: 3
    Actually, maybe I'm just not getting it, but I don't know what to do from what I've looked at. I mean, I don't know what attribute it's supposed to be, how to edit an attribute to do what I want it to, and how to add "if all actors with tag "x" are destroyed change to this scene" / "if all actors with tag "x" are not destroyed change to other scene" Currently I'm to the point of just setting up a time limit, but I don't know how to set the attributes to go to two different scenes. I think it should be a boolean if I listened to the tutorial correctly.
    Thank you for the link to the tutorials though. They helped with finding a countdown timer.
  • TheGabfatherTheGabfather Member Posts: 633
    edited April 2013
    @Micala42 If you setup a time limit, that will really change the gameplay a lot :)

    Think of attributes as variables or containers of a certain data type (egs. boolean, integer, etc) and the way you would change their default value would be to use, for example, the Change Attribute Behavior.

    You place these Behaviors within Rules (for your game, at least), and in your game's case you might want to consult this thread for detecting when all enemy actors have been destroyed: http://forums.gamesalad.com/discussion/55795/how-can-i-know-if-all-enemies-are-dead#latest

    Good luck and sorry to hear about your tight deadline. You really should consult the CookBook more often. And start working early :) not that you didn't this time.
Sign In or Register to comment.