* *
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 18, 2017, 04:15:38 PM

Login with username, password and session length

Damage from falling from platform

  • 3 Replies
  • 515 Views
*

Offline O Ilusionista

  • Global Moderator
  • Hero Member
  • *****
  • 4880
  • >> I WILL BE AWAY FOR SOME TIME <<
    • BMT - Brazil Mugen Team
Damage from falling from platform
« on: February 16, 2017, 08:52:47 PM »
Is this doable? To make the player receive damage when he falls from an platform?

*

Offline Damon Caskey

  • Administrator
  • Hero Member
  • *****
  • 1760
    • DC Current
Re: Damage from falling from platform
« Reply #1 on: February 16, 2017, 09:18:12 PM »
Sure. There's several ways you could. Do you mean walking off, falls, etc..?
Projects in progress are now available here: https://github.com/DCurrent

*

Offline O Ilusionista

  • Global Moderator
  • Hero Member
  • *****
  • 4880
  • >> I WILL BE AWAY FOR SOME TIME <<
    • BMT - Brazil Mugen Team
Re: Damage from falling from platform
« Reply #2 on: February 17, 2017, 10:44:12 AM »
This is a question made in the facebook group I manage. I think the user means when he walks off from a high plataform, kinda like in the old games.

*

Offline Damon Caskey

  • Administrator
  • Hero Member
  • *****
  • 1760
    • DC Current
Re: Damage from falling from platform
« Reply #3 on: February 17, 2017, 01:59:50 PM »
Without going into all the minutia, the way I would do it is use the onmoveascript. I'd set up a check that compares the base with altitude, and if the difference is big enough, then put the entity into a falling state and set their damageonlanding property. If you wanted to get fancy, you could use a formula to set a variable damageonlanding value based on the height difference instead of a static amount of damage.

DC
Projects in progress are now available here: https://github.com/DCurrent

 

Recent

Members
Stats
  • Total Posts: 46510
  • Total Topics: 3186
  • Online Today: 34
  • Online Ever: 316
  • (January 04, 2013, 09:43:02 AM)
Users Online
Users: 3
Guests: 20
Total: 23