Limited number of spawns

Pineapple_KingPineapple_King Member Posts: 16
edited November -1 in Working with GS (Mac)
Hey all,
I am looking for a rule that can either limit the number of spawns of an actor (meaning i can only click 10 times, after the 10th click no actor is spawned) or stop spawning altogether after certain conditions are met.
Thanks a lot,
PK

Comments

  • design219design219 Member Posts: 2,273
    Create a real attribute "10SpawnLimit", integer.

    In your spawn rule have the condition "if SpawnLimit < 10", and add a change attribute behavior "10SpawnLimit +1"

    At some point you will probably need to clear or reduce that number, like if you destroy one of the spawns, change attribute "10SpawnLimit -1"

    There might be a simpler way.

    _______________

    Nesen Probe http://itunes.apple.com/us/app/nesen-probe/id377766693?mt=8
    Tickle Stones http://itunes.apple.com/us/app/tickle-stones/id363484260?mt=8
    
Food Fight! (free) http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
  • Pineapple_KingPineapple_King Member Posts: 16
    thanks design219, i will try to implement the rule and let you know.
    Cheers,
    PK
  • FranzKellerFranzKeller Member Posts: 517
    Here's a question - can a user crash the I app by repeatedly spawning something by clicking hundreds of times? Or hopefully that would just make the program run slowly for a while....?
  • Pineapple_KingPineapple_King Member Posts: 16
    FranzKeller said:
    Here's a question - can a user crash the I app by repeatedly spawning something by clicking hundreds of times? Or hopefully that would just make the program run slowly for a while....?

    have no idea franz.... i dont think it would crash though..
  • FranzKellerFranzKeller Member Posts: 517
    Perhaps a numerical spawn limit param, by type, or by actor, would prevent this

    I've never reached a crash by this, but might once I start making spaceship shooters ;-)

    Lasers everywhere!
Sign In or Register to comment.