How to make a chain attack score?

williamt2706williamt2706 Member, PRO Posts: 85
edited September 2012 in Working with GS (Mac)
Hello everyone,

I found myself a little problem here, i want to make a chain attack to create a bonus score.
Example: Everytime i defeat enemy, and i defeat the next one within 2 second, i want to create a "chain attack" attribute. And every time i defeat another enemy within 2 second from the last one i defeated, i want to make the "chain attack" to continue.
And if after 2 second i didn't defeat any enemies the "chain attack" cut off. How to do that?

Any help would be appreciate :D

(Sorry my bad english)

Comments

  • xforcexforce Member Posts: 187
    edited September 2012
    make a chainattack global attribute

    inside your enemies have

    change attribute game.chainattack to game.chainattack+1


    in a seperate actor have a rule

    when game.chainattack=1
    timer after 2 seconds change attribute game.chainattack to 0

    when game.chainattack=2
    timer after 2 seconds change attribute game.chainattack to 0

    when game.chainattack=3
    timer after 2 seconds change attribute game.chainattack to 0

    when game.chainattack=4
    timer after 2 seconds change attribute game.chainattack to 0

    etc

    just make sure that the highest number for your chainattack has a ≥ next to it else it wont reset.
    eg;

    when game.chainattack ≥ to 4
    timer after 2 seconds change attribute game.chainattack to 0
  • williamt2706williamt2706 Member, PRO Posts: 85
    thx, it works perfectly :)
Sign In or Register to comment.