spawning a certain number of enemy to end a level

ok..
i can spawn the enemys.. but can seem to work out how to "destroy x number of enemys" then load the next level.

help would be great.

Comments

  • TosanuTosanu Member, PRO Posts: 388

    Make a global attribute "Total Kill"

    Add to the creature's kill behavior A feature along the lines of "when health = 0" or "when collides with attack" : "Totalkill = totalkill+1, Destroy this actor"

    And make a second behavior on either the hero or another actor that says "When total kill equals or is greater than" whatever you need the total to be, "set totalkill to zero"(for next level), "load next scene"

    I recommend using a special LevelEnd actor. That way you can make the necessary total an attribute call and simply edit it on the Actor pane for each level.

Sign In or Register to comment.