Is there a way to end a round with 'all badguys are dead' behavior?

pjnolenpjnolen Member Posts: 152
edited November -1 in Working with GS (Mac)
I need something along the lines of telling the game to end a round when all the badguys are dead.

We have a 'collides or overlaps' condition, I WISH we had a 'does not overlap or collide' condition. It would make it so easy.

I have 4 different badguys(some rounds fight 1 of 1, some fight all 4, or 2 of 1 etc), 5 different fights over 6 different stages. After each 'wave' i need to tell the game to start the next wave in x seconds. Not sure how to do that. Without making a different game attribute for each and every round.

There's got to be a way to do it with 5 or less attributes....something, I dread making 120 attributes just for starting the next round of fighting.

Anyone have any ideas?

Comments

  • PhoticsPhotics Member Posts: 4,172
    pjnolen said:
    We have a 'collides or overlaps' condition, I WISH we had a 'does not overlap or collide' condition. It would make it so easy.

    "otherwise"
  • entersimonentersimon Member, PRO Posts: 273
    You can do it with one attribute.

    Create an integer and call it Bad Guys Dead

    Now in each bad guy actor you have, add a rule that says when the condition required for it to "die", i.e. when it overlaps with a bullet actor, change attribute game.Bad Guys Dead to game.Bad Guys Dead + 1

    Then in another actor you can have rules that say:

    When game.Bad Guys Dead = 1
    .....start round 2

    When game.Bad Guys Dead = 3
    ......start round 3

    and so on and so on.

    Best of luck!

    :^)
  • pjnolenpjnolen Member Posts: 152
    You know...i keep forgetting about that little guy. Though using 'otherwise' i'm not sure how to get away with doing, um, 5 difficulty lvls with 6 fights per stage(including boss) + 6 stages still equals 180 attributes.

    I can use 'otherwise' to tell the round that it ended, but to tell the next round to start, and which npcs to spawn, will need to be different Attribute for each one right?
  • pjnolenpjnolen Member Posts: 152
    entersimon said:
    You can do it with one attribute.

    Create an integer and call it Bad Guys Dead

    Now in each bad guy actor you have, add a rule that says when the condition required for it to "die", i.e. when it overlaps with a bullet actor, change attribute game.Bad Guys Dead to game.Bad Guys Dead + 1

    Then in another actor you can have rules that say:

    When game.Bad Guys Dead = 1
    .....start round 2

    When game.Bad Guys Dead = 3
    ......start round 3

    and so on and so on.

    Best of luck!

    :^)

    Going to take a minute to wrap my head around this...

    Wouldn't "round 2" and "round 3" need to be an Attribute of their own with rules for spawning specific badguys?
  • entersimonentersimon Member, PRO Posts: 273
    You can have a controller actor that never leaves the scene that acts as your spawner. You'd put all your spawning rules inside this actor.

    You don't "need" round 2 and round 3 attributes. It really all depends on how you want to organize your game. You can have them if it helps your brain keep everything organized. Adding attributes doesn't have much of an effect on performance, but the less you have the easier it is to keep track of them.
  • pjnolenpjnolen Member Posts: 152
    Ok, I think i see what you mean. Did a few test rounds, and this will work perfectly. Thanks gentlemen for your help!
Sign In or Register to comment.