Jump to content
Sign in to follow this  
audiocustoms

Sling Load Overweigt Warning

Recommended Posts

Hey...

I'm currently working on some kind of a "bitching betty" and i want to play a sound when the "slingLoadMaxCargoMass" is reached. I also want to play a sound when the cargo is attached and detached. Any ideas how to achieve that?

Greez...

Edited by audiocustoms

Share this post


Link to post
Share on other sites

This is what i got by now, but not working:

#define WarningTime 6
_vehicle = _this select 0;
_var_max_sl_weight = 4000;
_warning = 0;

while {(player in (crew _vehicle)) && (alive _vehicle)} do {

_load = getSlingLoad _vehicle;
_load_mass     = getmass _load;

/////    Slingload Overweight Warning
if ((_var_max_sl_weight < _load_mass) && (time - _Warning >= WarningTime)) then 
{
_Warning = time;
_vehicle vehicleRadio "cargo_overweight";
};
};

I'm getting a script error: "_load_mass" not defined...

Any ideas?

Edited by audiocustoms

Share this post


Link to post
Share on other sites

Solved...

_var_maxload < getmass (getSlingLoad (vehicle player))

Edited by audiocustoms

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  

×