Destroying a character with multiple clicks!! URGENT HELP PLEASE COLLEGE DEADLINE!!!!

I am working on a concept for a game and I need to make it so that when battling the boss you must click the character 10 times before she destroys.
So far I have set my Rule to:

(ClickCount)
Actor receives event Mouse Button is Down
Actor receives event mouse position is inside
Attribute game.killEnemy=0.0
-> Change Attribute game.killEnemy TO game.killEnemy+1

(DestroyMe)
Atrribute game.killEnemy=10
->Destroy Actor

----------------------------

With these rules in place the actor still destroys after the initial click, what am I doing wrong? And how can I change the rule so the actor destroys after 10 clicks not 1.

PLEASE HELP!!!! COLLEGE DEADLINE SOON APPROACHING!

Comments

  • DesignsByJamesDesignsByJames Member Posts: 4
    Email me at TheDesignerJames@gmail.com as soon as you know please, highly appreciated!!! My deadline is Tuesday 26th November 2013
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    See response to your other post... :)
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited November 2013
    Life or death urgent?! Is that possible developing games?
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Actor receives event Mouse Button is Down
    Actor receives event mouse position is inside
    Attribute game.killEnemy=0.0
    -> Change Attribute game.killEnemy TO game.killEnemy+1

    change this to

    touch is pressed and Attribute game.killEnemy < 10.0
    -> Change Attribute game.killEnemy TO game.killEnemy+1
  • CrestwoodCrestwood Member Posts: 80
    I would simply have an actor attribute called ClickCount. It does not have to be game attribute. Then just add to it.

    SelfAttribute Int ClickCount=0

    Rule
    Actor receives event mouse button is down
    Actor receives event mouse position is inside
    Change Attribute self.ClickCount to self.ClickCount+1

    Rule
    Attribute self.ClickCount = 10
    Destroy

    You could also increment the could with the Touch is pressed. This will destroy the actor after 10 clicks/touches.

Sign In or Register to comment.