#fall damage
1 messages · Page 1 of 1 (latest)
Bool Variable "InAir" = False
Vector3 Variable "AirStartPos"
Float Variable "AirMaxSpeed"
Event Receiver (Update 30hz) > Set "InAir" to ({Player Get Is Jumping Or Falling(Local Player)}) > If {InAir}
Then > Set "AirMaxSpeed" to (max((Get Velocity(Get Local Player)).y,AirMaxSpeed)
Event Receiver (Variable InAir Changes) > If {InAir}
Then > Set "AirStartPos" to (Combatant Get Ground Position(Get Local Player))
Else (Player Hit Ground) > Damage Circuit > Set AirMaxSpeed to (0)```
Then you can deal damage based off how far they fell + how fast they fell
Bool Variable "InAir" = False
Vector3 Variable "AirStartPos"
Float Variable "AirMaxSpeed"
Event Receiver (Update 30hz) > Set "InAir" to ({Player Get Is Jumping Or Falling(Local Player)}) > If {InAir}
Then > Set "AirMaxSpeed" to (max((Get Velocity(Get Local Player)).y,AirMaxSpeed)
Event Receiver (Variable InAir Changes) > If {InAir}
Then > Set "AirStartPos" to (Combatant Get Ground Position(Get Local Player))
Else (Player Hit Ground) > Damage Circuit > Set AirMaxSpeed to (0)```
Then you can deal damage based off how far they fell + how fast they fell