Jump to content
RS30002

player vehicle damage detection

Recommended Posts

Hi

 

need this

 

getdammage (vehicle player) > 0.6;

 

in a form that recognizes if player is a driver of a plane/helicopter and damage is 60%. Vehicle can't be named. 

 

There's a lot of "if () then {}" examples on the net but i cant seem to put together a syntax that only goes into a trigger condition that is supposed to give a task to go repair your vehicle.

Right now it gives the repair task if vehicle or player is damaged/hurt.

 

Thanks in advance for any insights! 🙂

 

 

Share this post


Link to post
Share on other sites

vehicle player is the player himself if on foot (infantry), his vehicle (whatever role) if seated inside a vehicle.

You could use the eventHandler "handleDamage" but if you want a trigger, just try:

damage objectParent player > 0.6

(objectParent is null when on foot and returns the vehicle when inside it)

for driver only:

damage objectParent player > 0.6 && {driver objectParent player == player}

 

Note: in MP, edited triggers need more conditions for running locally. 

 

  • Like 2

Share this post


Link to post
Share on other sites
9 minutes ago, pierremgi said:

vehicle player is the player himself if on foot (infantry), his vehicle (whatever role) if seated inside a vehicle.

You could use the eventHandler "handleDamage" but if you want a trigger, just try:

damage objectParent player > 0.6

(objectParent is null when on foot and returns the vehicle when inside it)

for driver only:

damage objectParent player > 0.6 && {driver objectParent player == player}

 

Note: in MP, edited triggers need more conditions for running locally. 

 

 

 

Yaay it works! 🤗

 

Thank you! 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×