Search the Community
Showing results for tags 'law'.
Found 3 results
-
Developed in partnership with the 2035: Russian Armed Forces mod. Check them out here! Art by Mr.Mustache Steam Workshop Discord Patreon Made possible thanks to the support of my wonderful patrons. ❤️ Heliotrope, Bran Flakes, Renegade_Jonesy, Slav_Man_Shae, GeneralKong David - Mustache, CommanderCharms, Andrew Dietz, Scott Reijnders Ezzy, Florian Noé, Spess Mehreen, Pheasant-One, Krijn Lakeman, YonV Ravenholme, Buttista, Takaostar, Schuyler P Jarrett, Krytera, coolscout09 Corvid, Itsme M, Elliot Taylor
- 828 replies
-
- 49
-
Better alternative to "assignedTarget"
lawman_actual posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Looking for some advice on what functions to use. Currently I have attached a "FIRED" event handler to each member of a recon team. Once the trigger fires, it assesses what the unit is shooting at, and if the target belongs to the WEST side, it has 'positively identified' NATO in the area. //player sideChat (format ["%1",_this]); _unit = (_this select 0); _group = group _unit; _leader = leader _group; _target = assignedTarget _unit; player sideChat (format ["Target: %1",_target]); //player sideChat (format ["Side: %1",(side _target)]); //player sideChat (format ["Qrf1: %1",qrf1Sent]); //player sideChat (format ["Qrf2: %1",qrf2Sent]); if ((side _target) == WEST) then { if (reconOnSite) then { if (!qrf1Sent) then {_aaq = execVM "law\dispatchQrf1.sqf";}; if (!qrf2Sent) then {_aar = execVM "law\dispatchQrf2.sqf";}; }; } else { if ((reconOnSite) && (!qrf1Sent)) then {_aad = execVM "law\dispatchQrf1.sqf";}; }; Hence; if the recon team is only firing upon local militia, a small QRF is needed. If the recon team is in contact with NATO forces, a large one. The problem is that assignedTarget appears to rely upon the group leader specifically directing one of the units to fire upon the target. If the unit simply sees an enemy and fires of it's own initiative, the target is returned as 'objectNull' and the script fails. In most cases, this isn't a problem. But the recon team is only small, and if the group leader is killed before this happens it might cause problems. Is there a better way of assessing what the unit is firing at without having a target assigned? -
Group name not recognised (type string, expected group)
lawman_actual posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
A recurring problem that i seem to run into is I don't know how to use group names as group names when writing scripts. Let me explain: In the eden editor, I have set the name of a group; by opening the interface for the group (double click on the icon above group leader) and entering something in the 'callsign' field. However, if I now go to write a script that requires the name of that group, i can't seem to format it in such a way that the command will accept the name I have inputted. For example, here is a snippet from the mission: _group = "R Rustam 1 - Alpha"; _leader = leader _group; _passangers = _group - _leader; _leader assignAsDriver qrf_w1; {_x assignAsCargo qrf_w1} forEach _passangers; _group orderGetIn true; What i can't get to work is the leader command, because no matter how I format the group name it doesn't seem to want to accept it. I believe the following has been tried without success: _group = "R Rustam 1 - Alpha"; _group = "Rustam 1 - Alpha"; _group = R Rustam 1 - Alpha; _group = Rustam 1 - Alpha;