playMaker

Author Topic: Falling Damage  (Read 1438 times)

Sprite

  • Playmaker Newbie
  • *
  • Posts: 1
Falling Damage
« on: September 06, 2017, 07:14:13 AM »
Hi everybody!
I'm new here, I've worked with Playmaker last mounths but now I've a crucial issue for my project.
I'm making a climbing game (assassin's creed style): the basic controller is form Invector Lite version (with an extra cool climbing system added) the rest (health,melee and enemy Ai) is made with Playmaker.

I'd like to know if It's possible to create a Falling Damage system with playmaker, I think the best way is calculating the falling time and than add damage, but I don't know if (and how) i can do it with playmaker.
Another possibility is working with a script, but in that case I don't know how to connect the script with Health FSM.

Thanks to everyone here! :)
(I'm going to post some project update  ;) )

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Falling Damage
« Reply #1 on: September 06, 2017, 11:22:17 AM »
Hi,
you can use "Get Time Info" and set to 'time in current state' while falling you need to have a state active with the "Get Time Info"
You can for example have it on a different fsm and use global transitions
once you hit the floor change the state, and the variable will not go up anymore.

Another way you could do is :
when starting to fall, get the y position
Then when fall ends get the y position again
and calculate the difference.