KlashX 0 Posted December 2, 2021 Hi guys, I'm new to Arma 3 scripting and am trying to build a mission where two hostage players are being traded between two sides, while a third tries to intervene. (A remake of Shacktac's "Dark Business", if you're familiar with the gametype.) I want to avoid putting a Zeus referee up to "Call the game" when a team recovers these hostages. I'd like help writing the trigger activation condition for what, clumsily, I would summarize as: Hostage1 and Hostage 2 in thislist OR (!alive Hostage1) and (Hostage 2 in thislist) OR (!alive Hostage2) and (Hostage 1 in thislist) I've read that you can group units to a trigger and have seen the "Owner Only - Present" defaults in the trigger menu of the Eden editor, however I'm fairly certain that if one of these players enters the area and the other is still alive somewhere, it will fire anyway- leaving a hostage out in the cold. Am I wrong about this? Would one of you fine people help me format this trigger activation condition properly instead? Thanks! Share this post Link to post Share on other sites
opusfmspol 282 Posted December 2, 2021 I would suggest a server-only trigger with condition something like: {_x In [Hostage1,Hostage2]} Count thisList == {Alive _x} Count [Hostage1,Hostage2] 2 hours ago, KlashX said: I've read that you can group units to a trigger and have seen the "Owner Only - Present" defaults in the trigger menu of the Eden editor, however I'm fairly certain that if one of these players enters the area and the other is still alive somewhere, it will fire anyway- leaving a hostage out in the cold. The owner is a group. If the hostages are grouped, it could work by setting it to "whole group" present. But might be problematic (killed units go to grpNull, but still register in the team until the leader realizes they're dead, "We lost 2!"). But I don't suspect you would want the hostages grouped, would you? I miss ShackTac doing "Dark Business" missions, who would ever forget after watching "Giggles The Carjacker". Share this post Link to post Share on other sites
KlashX 0 Posted December 2, 2021 Thanks Opus, I'll try out your script! Shacktac's Arma 2 gameplay videos were one of the things that convinced me to get into Arma 3; it's some excellent content! Share this post Link to post Share on other sites
pierremgi 4906 Posted December 4, 2021 thisList always refer to your preset condition and only preset condition (like anyplayer present) So, if any player, or BLUFOR, or other preset condition doesn't match with your goal, for example specific group or units, add a filter like above, or... forget the preset condition (then thisList) and write yours, using the trigger area: none,none {alive _x && _x inArea thisTrigger} count [hostage1,hostage2] == 2 2 Share this post Link to post Share on other sites
Captinlarry 0 Posted December 14, 2021 How would you activate a trigger through an SQF? E3 hideObjectGlobal false; Sleep 1; triggerActivated TurboBomb; // Current Line im trying to use G4 hideObjectGlobal true;https://gyazo.com/641c0226cab80eac03d04a2c5fed444b E2 setDamage [1, true]; // On activation E3 setDamage [1, true];https://gyazo.com/ce586674451bc34a810bb59350bb9817 Sqf fires and completes all other tasks other than activating the trigger Share this post Link to post Share on other sites
Harzach 2518 Posted December 14, 2021 Why would you activate a trigger via sqf? Just execute your onAct code in your sqf. 1 Share this post Link to post Share on other sites
Captinlarry 0 Posted December 14, 2021 2 minutes ago, Harzach said: Why would you activate a trigger via sqf? Just execute your onAct code in your sqf. my onAct code of E2 setDamage [1, true]; E3 setDamage [1, true]; doesnt seem to work Share this post Link to post Share on other sites
Harzach 2518 Posted December 14, 2021 Well, you don't need to use the alternate syntax if you aren't setting the second parameter to "false." What are E2 and E3? *edit* - moving discussion to the topic you created Share this post Link to post Share on other sites
pierremgi 4906 Posted December 14, 2021 8 hours ago, Captinlarry said: How would you activate a trigger through an SQF? triggerActivated TurboBomb; // Current Line im trying to use Sqf fires and completes all other tasks other than activating the trigger @Harzach is right. You can run the "on activation" code of our trigger, straight inside your sqf. That's the simplest way. Now, if for some reason, you want to fire a trigger thru a code, just define a global variable, like trig1act . Set this variable to false at init, then true inside your sqf/code. You just have to add a condition at your trigger: trig1act or (your existing condition) triggerActivated aTrigger is just returning the info as boolean for aTrigger activated or not. 2 Share this post Link to post Share on other sites
Harzach 2518 Posted December 14, 2021 16 minutes ago, pierremgi said: just define a global variable Yup, I mentioned that in the other topic, great minds and all that 😄 1 Share this post Link to post Share on other sites