How do I do fall damage.

  • Hello , i would like to ask how could i do a fall damage. I have no idea how to scipt the falling script. What i need is if you fall from 5 metres it will take some damage , and if you fall from 10 metres you dead. I could not find any tutorial for it. Thank you for help.

  • There's many ways you could do this, you could measure the amount of time the character has been falling for, or their velocity, or their speed - funnily enough they're all "different".

    The most universally applicable solution is a fall timer, but it would help if we knew a bit about the game, are you using the platform, physics or custom movement behaviour?

  • hi and thank you. I am using platform for my character.

  • This should help:

  • Thank you very much , very helpful

  • interested in seeing how this was executed. I understand that VectorY can tell me the fall speed but how can I use that to determine if/when to trigger damage?

  • I would just make a counter, and every tick would add 1, and make a condition that if counter greater then a certain number, when player is on the floor, trigger once the damage stuff and reset counter.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would just make a counter, and every tick would add 1, and make a condition that if counter greater then a certain number, when player is on the floor, trigger once the damage stuff and reset counter.

    Thanks megatronx.

    I went with your idea and it seems to be working well. For anyone who may look at this thread, here are the steps I used:

    [attachment=0:27dskqli][/attachment:27dskqli]

    When falling from a large distance, the player will flash and loose 1 health.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)