how to make it so when the score reaches 20, it will trigger spawner?

justinodunnjustinodunn Member, PRO Posts: 226
edited February 2014 in Working with GS (Mac)
how to make it so when the score goes to 20, an actor spawner will be activated? thanks

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    When attribute game.score ≥ 20
         Spawn actor [actor name]

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • justinodunnjustinodunn Member, PRO Posts: 226
    the thing is the spawner has a rule of its own because it is a random spawner..
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2014
    the thing is the spawner has a rule of its own because it is a random spawner..
    I don't know what that means. Are you saying you can't add another rule? Rules can have more than one condition. So if you have an existing condition, add a new one with attribute game.score ≥ 20.

    Or if you don't want to use multiple conditions, you can create a new rule with that condition and then put your existing rule inside of it.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • justinodunnjustinodunn Member, PRO Posts: 226
    my rule is to repeat the random timed respawn, so it goes if x attribute is true then spawn actor, but after 0.1 change the attribute back to false. can i add that attribute for the rule then?
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    Sorry if I'm misunderstanding what you are exactly doing but it's kind of confusing how your explaining it. Since you are using a boolean you could say When attribute game.score ≥ 20
    Then change x attribute to true
    After 0.1 seconds (run to completion)
    change x attribute to false

    Hope that's what your looking for!
Sign In or Register to comment.