Make scene change by destroying objects, how?

vhs2708vhs2708 Member Posts: 1
edited November -1 in Working with GS (Mac)
I'd like my game to automatically change to next scene once all the enemies are destroyed! Please help, I'm sure it's absolutely obvious but so far I'm at a loss. Thanks a million for help.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi, make an integer attribute called EnemiesD, for example. Set it's value as the number of enemies there are. Put an actor outside of the play area in your scene, and in it's Rules, put:

    When Attribute EnemiesD = 0
    Change Scene

    In your enemy actors, in each one, there needs to be - just before the Destroy Behavior in each case -

    Change attribute EnemiesD to EnemiesD -1

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.