Otter 0 Posted May 7, 2008 I would like to add a "SoldierGPilot" unit option to this script for Xeno's "Domination!" that lets a player pilot repair a vehicle, but have no clue how to do it, so if someone could please point me in the right direction that would be appreciated. I figured out how to add the pilot to the mission choice, but I don't know how to go from there, array, variable???: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_objs"]; if ((vehicle player) == player && player isKindOf "SoldierGMiner")then{_objs = nearestObjects [player,["LandVehicle","Air"],5];if (count _objs > 0) then {objectID2 = _objs select 0;if (alive objectID2) then {if(damage objectID2 > 0.05 || fuel objectID2<1)then{true}else{false};}else{false};};}else{false}; Share this post Link to post Share on other sites
Otter 0 Posted May 7, 2008 Figured it out from the Wiki, used "or" operator ("||"):<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_objs"]; if ((vehicle player) == player && player isKindOf "SoldierGMiner" || player isKindOf "SoldierGPilot")then{_objs = nearestObjects [player,["LandVehicle","Air"],5];if (count _objs > 0) then {objectID2 = _objs select 0;if (alive objectID2) then {if(damage objectID2 > 0.05 || fuel objectID2<1)then{true}else{false};}else{false};};}else{false}; Share this post Link to post Share on other sites