Im building a stickman fighting game and i'm having some problems setting up the code for basic melee combat. I have read and watched different tutorials but i can't seem to get it to work. Essentially when you hit a button then it should play a animation. When the enemy comes in contact with the player while he is performing said animation then he will lose one health. Just need in code form
Develop games in your browser. Powerful, performant & highly capable.
Keyboard On Space pressed -> Player start animation "Attack" Enemy On collision with Player Player animation "Attack" is playing -> Enemy subtract 1 from Health Else -> Player subtract 1 from Health [/code:2577gggo]
Awhhhh it did not quite work mate. Honestly im very new to Construct 2 and I just started messing around with the software. I can link the .capx file if you would like to edit it or give me some pointers. Maybe it would help seeing it for yourself <img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing"> also don't judge the animations lol just the beginning of it all.
https://www.dropbox.com/s/ri6fj1n95bsml ... .capx?dl=0
I checked your capx, it works fine. Health is subtracted correctly from either Player or Pursuit.
You can preview in Debug Mode and check for yourself.
You are correct! it does work. I forgot about the debug. I also had not set the code up to destroy the play on 0 health. Thank you very much!