Jump to content
Sign in to follow this  
Cross Shot

Help creating Group or Array

Recommended Posts

Hi I'm new here and I'm attempting to make a script that allows people of a certain group to repair and refuel vehicles, I've tried using the or operator but that doesn't seem to help, this is what i have so far

setup.sqs

_vehicle = _this select 0;
_player = player;

#distcheck
?((_player distance _vehicle)<10): goto "actionadd"
goto "distcheck"

#actionadd
?(_player == engineer1):actionID = _vehicle addAction["Repair/Refuel","scripts\repair.sqf"]

where the ?(_player == engineer1) is, is where I'm trying to check it against multiple objects, I'm not sure if i can check through an array or not, any help would be greatly appreciated.

Edited by Cross Shot

Share this post


Link to post
Share on other sites

Ack, get rid of all that crazy looping stuff! :) SQS is dead, long live SQF.

Don't need a loop anyway, ArmA2 has added Conditions to addAction:

Something like this:

_actionId = _vehicle addAction ["Repair/Refuel", "scripts\repair.sqf", "", 
 false, true, "", "(_player distance _vehicle < 10) && _player == engineer1"];

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  

×