game crash when i try to spawn 16 actors

tabelortabelor Member Posts: 114
edited November -1 in Working with GS (Mac)
In my game, when you destroy the 16 first actors, then the level go up (an integer) and i have a rule that when level is equal to 2, then spawn 16 new actors in a random position in the bottom of the screen.
But when level's up, it crashes :S
Anyone know why? Is 16 actors two much for GS? should i spawn one by one every second or something like this?

Edit: even if i spawn only one actor it crashes.

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Sounds like a bad rule somewhere. Maybe a rule is missing an attribute
  • iTouchGameriTouchGamer Member Posts: 681
    jonmulcahy said:
    Sounds like a bad rule somewhere. Maybe a rule is missing an attribute

    This is probably it, I had the same problem a few days ago and I had a bad rule in an actor that wasn't even touched by the spawning objects lol.
  • tabelortabelor Member Posts: 114
    yes sorry, the error was the spawning position of the actor. Now it's fixed because i have created a new actor (invisible) wich play the role of the position, he have this rule: when game level = 2 spawn actor Ant. Now the problem is when the level is equal to two, it indeed spawn the actor, but it do it again and again and again......How can i spawn only one actor?

    Sorry, edit again cause i think i can fix this error with a boolean. Thanks all for your answers!
  • iTouchGameriTouchGamer Member Posts: 681
    make a game attribute, name it spawning. then in your actor say when game level = 2, change spawning to 1. and say when spawning = 1, spawn ant. Then do a timer and say after 1 second (estimating) change attribute spawning to 0. Good luck
Sign In or Register to comment.