Jump to content
Sign in to follow this  
majorexperimental

How to make the "toolkit" usable without beeing a default Repair guy?

Recommended Posts

I suppose there is some code that can be added in the init box for the player to make it possible to use if me as player pick up a Toolkit in-game? The question is what code?

I tried this...

this additem "ToolKit";

...and also testing this

this additem "B_soldier_repair_F";

...and also the both together but it wont work. Any idea?

Share this post


Link to post
Share on other sites

this addItemToBackpack "ToolKit";

or

this addItemToVest "ToolKit";

Share this post


Link to post
Share on other sites
this addItemToBackpack "ToolKit";

or

this addItemToVest "ToolKit";

Sorry; but that didn't do the trick either.... Did not work...

Share this post


Link to post
Share on other sites

Something like this should be a good start :

_repair = player addAction ["Repair Vehicle", {
_veh = (nearestObjects [player, ['Car','Tank','Truck'], 5]) select 0;
player playActionNow 'medicStartRightSide';
sleep 3;
_veh setDamage 0;
player switchmove '';
},[], 1, false, true, "", "vehicle player == player && 'ToolKit' in (items player) && !(nearestObjects [player, ['Car','Tank','Truck'], 5] isEqualTo []) && damage (nearestObjects [player, ['Car','Tank','Truck'], 5] select 0) > 0"];

EDIT :

Oups, misread the OP...

Although the above is required : carrying a toolkit will not grant you the repair capacity.

The only way to make toolkits compatible with other untis would be a config change, sadly...

EDIT2 : Silly me, I thought it was impossible to pick up toolkits for regular units; I just tried and turns out you can.

As long as you have a backpack with a toolkit in it, the above addAction should work just fine. ;)

Edited by Pepe Hal

Share this post


Link to post
Share on other sites
Something like this should be a good start :

_repair = player addAction ["Repair Vehicle", {
_veh = (nearestObjects [player, ['Car','Tank','Truck'], 5]) select 0;
player playActionNow 'medicStartRightSide';
sleep 3;
_veh setDamage 0;
player switchmove '';
},[], 1, false, true, "", "vehicle player == player && 'ToolKit' in (items player) && !(nearestObjects [player, ['Car','Tank','Truck'], 5] isEqualTo []) && damage (nearestObjects [player, ['Car','Tank','Truck'], 5] select 0) > 0"];

EDIT :

Oups, misread the OP...

Although the above is required : carrying a toolkit will not grant you the repair capacity.

The only way to make toolkits compatible with other untis would be a config change, sadly...

EDIT2 : Silly me, I thought it was impossible to pick up toolkits for regular units; I just tried and turns out you can.

As long as you have a backpack with a toolkit in it, the above addAction should work just fine. ;)

When I try a toolkit in the package that isn't enough to be able to use it.

Share this post


Link to post
Share on other sites
When I try a toolkit in the package that isn't enough to be able to use it.

Are you sure?

I tried it on a damaged Hunter and was able to repair it just fine with the example I gave you.:confused:

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  

×