HELP WITH SPAWNING!

I am using the cannon trigger template and i want to limit the amount of "actors" the cannon spawns?

Comments

  • famekraftsfamekrafts Member, BASIC Posts: 834
    There was a Tshirtbooth tutorial on game salad cook book, check it out.

    Basic idea : is use a timer or attribute, say after 10 secs, you stop spawning by switching a boolean attribute off. So when it is true only then it spawns other wise not.

    Or you can setup two attributes. When attribute 1 is true make 2nd attribute, say every sec it spawns 2 actors, so it keeps adding 2 every second, when it becomes 100, change the first attribute to false again.



  • JValdovinosJValdovinos Member Posts: 6
    i mean like limit the "actors" it shoots like on angry birds how you get a limited amount of birds
  • blorschblorsch Member Posts: 248
    @JValdovinos, inside the cannon create a rule that says: If attribute game.actors_spawned is ≦ than actor_spawn_limit then spawn actor. Inside the actor you are spawning have a rule that says Change Attribute: game.actors_spawned To game.actors_spawned+1. Hope this helps. If you have any questions just leave a comment.

    Cheers,
  • JValdovinosJValdovinos Member Posts: 6
    @blorsch thank you that really helped.
Sign In or Register to comment.