[SOLVED] HELP - MODIFICATION - Die on Click or Touch

AlexCell

  • Posts: 5
Hello everyone,

I will want to apply some modifications to “Die on Click or Touch” knowing that I have already to test something but I am not able to set up it.

I will want that one is need to click five times so that the enemy dies and not once like by default.

Could somebody help me?

By thanking you enormously

AlexCell

FRENCH TEXT =========================================
Bonjour à tous,

Je voudrai appliquer quelques modifications à "De on Click or Touch" sachant que j'ai déjà essayer quelque chose mais je n'arrive pas à le mettre en place.

Je voudrai que l'on est besoin de clicker 5 fois pour que l'ennemi meurt et non pas une fois comme par défaut.


Quelqu'un pourrait-il m'aider ?

En vous remerciant énormement

AlexCell

« Last Edit: July 17, 2014, 08:56:50 am by AlexCell »

sdieters

  • Posts: 2068
it's very simple =)

create a number attribute and give it a value in the behaviors tab.
everytime you press the actor, subtract that number attribute by 1
after the subtraction, you check if your number attribute has a value of 0, and if that is true, kill the actor.

Good luck
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

AlexCell

  • Posts: 5
Thank to you,

i try it and i come back to you.

AlexCell

AlexCell

  • Posts: 5
@sdieters,

I found  :D, I do not think of making simpler and faster.

For the curious ones look at the image.


FRENCH TEXT =========================================

@sdieters,

J'ai trouvé, je ne pense pas faire plus simple et plus rapide.

Qu'en penses tu ?


Pour les curieux regardez les images

sdieters

  • Posts: 2068
close enough ^^
but i would get rid of the always event for lesser CPU usage >>
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

AlexCell

  • Posts: 5
@sdieters,

I do not control CPU use yet.

Thank you,

 AlexCell

FRENCH TEXT =========================================

@sdieters,

Je ne maîtrise pas encore CPU usage.

Merci,

AlexCell