Spawn Actor, Help Limit Spawns

BrackAttackBrackAttack Member Posts: 22
edited February 2012 in Working with GS (Mac)
Basically: when actor 1 overlaps with actor 2, spawn another actor 2. However, I just want ONE new actor to spawn with each overlap - but what I am getting is a bunch of actors spawning until actor 1 stops overlapping with actor 2. What am I missing?

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    edited February 2012
    actor 1 … add attribute … index type … didSpawn

    Rule: when
    Event: overlap/collide with actor2
    --Rule: when (nested)
    --Attribute: self.didSpawn = 0
    ----Spawn actor2
    ----changeAttribute: self.didSpawn To: 1
    Otherwise: (this is on main rule)
    --changeAttribute: self.didSpawn To: 0

    @};- MH
Sign In or Register to comment.