Jump to content
Sign in to follow this  
ROTAHOE

Check if player is in the water

Recommended Posts

whats wrong with this ? Its not working 

if (surfaceIsWater getPos player) then {player addAction ["Drop rubber boat", "BoatSpawer.sqf", [], 1, TRUE, TRUE, "", "vehicle _this == _target && _target getVariable ['crrcsdropped', 0] < 2"];};

 

Share this post


Link to post
Share on other sites

Dude, get your head around debugging and give out more details on what's "not working".

 

Cheers

Share this post


Link to post
Share on other sites

this works fine

player addAction ["Drop rubber boat", "BoatSpawer.sqf", [], 1, TRUE, TRUE, "", "vehicle _this == _target && _target getVariable ['crrcsdropped', 0] < 2"];

But its not picking up I'm in the water to add the action to the player 

if (surfaceIsWater getPos player) then { };

 

Share this post


Link to post
Share on other sites

Yup its returning true ? 

Share this post


Link to post
Share on other sites

Ditch the if () then {} and add the following to the actions condition string 

surfaceIsWater getPos _target 

 

  • Like 2

Share this post


Link to post
Share on other sites

perfect ! 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  

×