Jump to content

Recommended Posts

Good time of a day, dear Arma Community.

I am making a simple mission where the player is assigned to a helicopter crew, and needs to change the uniform, vest and headgear. It is a separate task, I've been inspired by the bootcamp task to take ACOR (if it is spelled right) sight. 
The issue is that I can't achieve the needed result, even though I have the right gear. Arma does not say there are any issues within the script, it just does not respond, nor gives the hint. I suppose the class is wrong, but don't know where.

 

I hoped you could assist me a little.
 

while {true} do {
   if (vest player == "V_TacVest_blk" && uniform player == "U_B_PilotCoveralls" && headgear player == "H_PilotHelmetHeli_B") then {

       hint "Geared and Ready";
       ["_gearUp", "SUCCEEDED"] call BIS_fnc_taskSetState;
       break;
     };
     sleep 2;
};


I am using SQF syntax.

Share this post


Link to post
Share on other sites

Although I cannot test any of these, the first suggestion I could give would be to force/stress the checking of each one of the equipment slots, something like:
 

if ((vest player == "V_TacVest_blk") && (uniform player == "U_B_PilotCoveralls") && (headgear player == "H_PilotHelmetHeli_B")) then

Maybe even something like this:

private _vest = (vest player == "V_TacVest_blk");
private _uniform = (uniform player == "U_B_PilotCoveralls");
private _headgear = (headgear player == "H_PilotHelmetHeli_B");

if (_vest && _uniform && _headgear) then




And it would probably be much better whether you create a trigger/area to make that check once a player gets inside, so you would not need the infinite loop permanently running.
Are you using that code on the init.sqf/description.ext?

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

×