Jump to content

Recommended Posts

Hello chaps

 

I'm not really good in scripting. I just started to create custom missions in Arma 3 so I need your little help.

 

What I'm trying to do is to save the exact loadout on unit after death and respawn with same gear. can somebody tell me how to do that?

Share this post


Link to post
Share on other sites
31 minutes ago, Nikander said:

You might find this post helpful

I tried that... didn't work :(

Share this post


Link to post
Share on other sites
20 hours ago, WurschtBanane said:

There is no simple way to do this....

 

 

Except the simple way.

 

in init.sqf


// Set Units current Loadout
    Fnc_Set_Loadout =
    {
    _unit = _this select 0;
    _unit setVariable ["Saved_Loadout",getUnitLoadout _unit];
    };

// Get Units current Loadout
    Fnc_Get_Loadout =
    {
    _unit = _this select 0;
    _unit setUnitLoadout (_unit getVariable ["Saved_Loadout",[]]);
    };

Then in initPlayerLocal.sqf

player addEventhandler ["Killed",  {_this spawn Fnc_Set_Loadout}];
player addEventHandler ["Respawn", {_this spawn Fnc_Get_Loadout}];
  • Like 1

Share this post


Link to post
Share on other sites
On 23. März 2017 at 8:20 PM, Beerkan said:

 

Except the simple way.

 

in init.sqf


// Set Units current Loadout
    Fnc_Set_Loadout =
    {
    _unit = _this select 0;
    _unit setVariable ["Saved_Loadout",getUnitLoadout _unit];
    };

// Get Units current Loadout
    Fnc_Get_Loadout =
    {
    _unit = _this select 0;
    _unit setUnitLoadout (_unit getVariable ["Saved_Loadout",[]]);
    };

Then in initPlayerLocal.sqf


player addEventhandler ["Killed",  {_this spawn Fnc_Set_Loadout}];
player addEventHandler ["Respawn", {_this spawn Fnc_Get_Loadout}];

 

Are you sure this will work with JIP?

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

×