Jump to content
ToastedWARFACE

Using getHit in a script to check repair state?

Recommended Posts

Hi, obligatory "I'm new to scripting". I've been trying to use the command getHit on a triggers Condition box to check the repair state of a vehicle but can't figure it out and can't get any search results that really help. Anyone willing to help me out? 

Share this post


Link to post
Share on other sites

Yes! And welcome to the rabbithole

 

But i need every line of code you used and the context:) 

Also describe the trigger settings and how it is linked to your vehicle. 

 

Cheers

Vd

  • Like 1

Share this post


Link to post
Share on other sites

Haha, thanks, love it already!

I've got a vehicle namned vehicle_start, when it hits a trigger, it has a set damage module that kills the engine. So I've written into its initilazation:
if ((Vehicle_Start getHit "engine") < 0.5) == REPAIRSTATE;
But I can't find an answer to what kind of number getHit outputs, if it's in whole numbers or if it's a decimal like I've assumed.. REPAIRSTATE is then used by a trigger to determine if vehicle_start has been repaired after the first set damage module has activated. All triggers are set to the vehicle, non-repeatable (nothing special).

Thanks in advance!

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

×