Jump to content
Sign in to follow this  
mrsandbox

Check if vehicle is in vehicle

Recommended Posts

I want to check, in a waypoint, would be the best, if a VTOL (Xiang) has NOT the specific vehicle in its cargo.

I found those script commands, but cant transform them into a simple waypoint condition.

Thanks in advance.

Share this post


Link to post
Share on other sites

the condition is:

yourVehicle in (getVehicleCargo yourVTOL)

The qustion now is: what do you intend to do with?

  • Like 1

Share this post


Link to post
Share on other sites
testCargo in (getVehicleCargo YourChopper)
//0.0009 ms

//more than 2x as fast using dedicated command:

isVehicleCargo testCargo
//0.0004 ms

Cheers

Share this post


Link to post
Share on other sites
13 minutes ago, Grumpy Old Man said:

testCargo in (getVehicleCargo YourChopper)
//0.0009 ms

//more than 2x as fast using dedicated command:

isVehicleCargo testCargo
//0.0004 ms

Cheers

 

You win 5 microsec... but you get a objectNul/object return instead of true/false. The reason why I suggested this code for a condition (waypoint or trigger).

Share this post


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

 

You win 5 microsec... but you get a objectNul/object return instead of true/false. The reason why I suggested this code for a condition (waypoint or trigger).

True, you still can check for objNull in a waypoint or trigger.

Also it's 0.5 microseconds (ms * 1000 = microseconds).

 

Cheers

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
Sign in to follow this  

×