Milosan 10 Posted August 1, 2010 This is my first attempted at making a mission and i wanted to implement: http://www.ofpec.com/forum/index.php?topic=30528.0 which is the POW capture script into it To implement 1. Copy across the info from the init.sqf and the POW_sqf folder into your mission directory DONE 2. Name your POW units in the editor something like POW1, POW2 etc. DONE 3. You need to define the units you want to be POWs in the _NORRN_POW array in the init.sqf. I can't find this _NORRN_POW array in the init.sqf eg: Code: _NORRN_POW = [POW1, POW2, POW3]; Also, which execVM sqf file do I use and do I put it in a trigger or a marker in the editor. Is this to difficult for someone that is just starting out in the editor? Is there another way that i can get player to a civilian, join to my group and follow at distance so I can get him to an extraction point? Sorry or my noobness, any help is appreciated. ---------- Post added at 10:33 PM ---------- Previous post was at 09:41 PM ---------- I've looked into an alternative. I used a joinSilent, attached to a trigger with a radio call. I could add an hint so people would know to use the radio to get him to join. now..I'd like him to follow at a distance so he can't be in to much danger Thanks in advance. Share this post Link to post Share on other sites
kylania 568 Posted August 1, 2010 (edited) Here's a demo mission you can try out with this method. It used a preset list of units, addAction, a script and a trigger. Preset list of units set in init.sqf or somewhere similar, in this demo it's done in the init field of the player: POWS = [p1,p2,p3,p4] p1 through p4 are captured civilians in a storage container. They are grouped, but since we're using the array we just declared they wouldn't have to be. The group leader has the following addAction in his init field: this addAction ["Rescue POWs","rescuePows.sqf",[POWS],1,false,true,"","(_target distance _this) < 3"]; That will present the player with a "Rescue POWs" action prompt if they are within 3m of the group leader. Upon selecting that action this script will run: _per = _this select 0; // Person who had the addAction _ldr = _this select 1; // Person who used the addAction _act = _this select 2; // ID of the addAction // Group given in the arguments section (ie: [POWS] _grp = _this select 3 select 0; // Remove the rescue option _per removeAction _act; // Join preselected units (POWS) to callers group, silently. {[_x] joinSilent _ldr} forEach _grp; The units will join the player's group, following him and following his orders as normal units would. In this demo the player is to turn around and tell the POWs to board the waiting Mi-17 (named rescue1) that just landed. This will mark them as "rescued" according to a trigger once they are onboard the helo. The condition of the trigger is such that if some should die, the rest can still be saved. Trigger Condition = {alive _x && (_x in rescue1)} count POWS == {alive _x} count POWS Trigger onAct = hint "POWs rescued!";{[_x] joinSilent grpNull} forEach POWS This will remove the POWs from the player's group. You might want to mark an objective complete at this point perhaps. Edited August 1, 2010 by kylania Share this post Link to post Share on other sites
Milosan 10 Posted August 1, 2010 Thanks kylania. I'll give the mission a go to see how it works. I was going to use that evac condition. Good to see I'm getting somewhere......slowly. Share this post Link to post Share on other sites
Cougs 10 Posted August 4, 2010 I have d/l Kyalania demo and it works sweet. Thanks. I then tried to copy/emulate that in my own mission with limited success. I can walk up to a bot and I get a RELEASE POWS on the action menu. Sweet. The resquepows.sqf fires (I put a hint in there so I'd know) but the units don't actually join my squad in the bottom left corner. I had the init in the player as above. I had my pows named as above. I had the Addaction in the init of the pow group leader. I have the SQF in the correct folder. What else am I missing? I stripped a lot of stuff out of the demo so I wonder if I took out too much. Also, can you use this on civilians only? Will it work for OPFOR or Insurgents or any class of bot? Can you use setCaptive 1 in tandem to design a VIP/hostage snatch and grab mission? And I just thought of one other thing (sorry) - can the script fire on a proximity trigger instead of an addaction so the pows are released by just getting to the right spot (a cell door)? Hmm, or the trigger can do the addaction on the POW but I'm not sure what that would achieve. Sorry - rambling. :) Share this post Link to post Share on other sites
kylania 568 Posted August 4, 2010 Here's another demo mission: Warlord Capture It features an attached 2m radius trigger which silently joins an OPFOR setcaptive'd Warlord to your BLUFOR group in a snatch and grab example. Share this post Link to post Share on other sites
Cougs 10 Posted August 4, 2010 Ha - awesome - this is totally what I wanted and more!! I played it three times even though that wasn't the intention - lol. Share this post Link to post Share on other sites
dai-san 0 Posted August 10, 2010 Hi kylania, As others have said, this is just what I needed for my mission. I am however coming up against 2 issues. 1: I only have one hostage (called h1) and i want a scenario where you have to keep him alive during a firefight. If I get him to the extract point everything is fine (except for one issue I will explain next) and I can trigger my Hostagelived.sqf. However my problem comes when he dies, this triggers my Hostagedied.sqf (as it should) but the hostagelived.sqf also triggers. I noticed in your example mission if you killed all the hostages then this also triggers the hostages rescued scenario. How would I stop this? 2: Rather than using a helo in my mission I'm using a CRCC (called rescue1) and even though I can order the hostage to get in rescue1 will not move to it's next waypoint. It's hold waypoint is sync'd to the switch trigger. Any help on these two points would be greatly appreciated mate. Share this post Link to post Share on other sites
kylania 568 Posted August 11, 2010 Here's a demo mission with your CRRC idea. It's a lot easier with just one hostage. To fix the killing everyone succeeds thing, change the in chopper condition to this: ({alive _x && (_x in rescue1)} count POWS == {alive _x} count POWS) && count POWS > 0 Share this post Link to post Share on other sites
sgtice 10 Posted November 2, 2010 So what if you wanted them to join seperately instead of in a group? Share this post Link to post Share on other sites
kylania 568 Posted November 2, 2010 Take the code in post #2, but instead of this: {[_x] joinSilent _ldr} forEach _grp; Use this: _per joinSilent _ldr; Share this post Link to post Share on other sites
Absolution_15th 10 Posted February 18, 2011 This is a good thread. I am trying to apply these tips to do a simple capture. My particular troubles concern the fact this is meant for a cooperative mission. I created a trigger that attaches to the warlord. This trigger will give the player an addaction if they get close enough. When the player uses the addaction I want the warlord to join the activating player's group. Instead... the warlord joins, what I suspect to be, the first group I made (I have several dozen). How do I get the warlord to join the group of the player who activated the trigger? Trigger on act: blufor = vehicle player; actionid1 = blufor addAction ["Capture Warlord!", "scripts\captureai.sqf"] captureai.sqf [hvt] joinSilent group this; hvt enableAI "MOVE"; hint format ["WARLORD CAPTURED!"]; The basic structure of this set up was borrowed from the "warlord capture" example. I am assuming my problem is in the sqf. None of my players are named. The capture part works just fine its WHO is actually doing the capturing that is the problem. Ideas? Share this post Link to post Share on other sites
f2k sel 164 Posted February 18, 2011 isn't the name of the unit passed by addaction I think it would be like this _caller = _this select 1; _caller being the name of the unit using the action. your code may be _caller= _this select 1; [hvt] joinSilent group _caller; hvt enableAI "MOVE"; hint format ["WARLORD CAPTURED!"]; Share this post Link to post Share on other sites
shuko 59 Posted February 18, 2011 No need for a trigger. warlord init field: this addAction ["Capture Warlord!", "capture.sqf",[],1,true,true,"","leader group _target == _target"]; this disableai "move"; capture.sqf: _u = _this select 0; [_u] joinSilent group player; _u enableAI "MOVE"; Removed hint because it's only shown for the capturing player anyway. He should be well aware that the warlord was captured. ;) Share this post Link to post Share on other sites
Absolution_15th 10 Posted February 18, 2011 No need for a trigger.... Ha! Just that simple and it works perfectly. I added in a "doStop _u;" to the end of the sqf code because the AI unit was still running off for some reason. It works and that is the point. May I ask what the "...[],1,true,true,..." part of the init text does? I am interested because I might be able to play around with those settings to get more interesting results. Share this post Link to post Share on other sites
f2k sel 164 Posted February 19, 2011 (edited) This should explain it all. http://community.bistudio.com/wiki/addAction http://forums.bistudio.com/showthread.php?t=98108&highlight=addaction Edited February 19, 2011 by F2k Sel Share this post Link to post Share on other sites
lordprimate 159 Posted April 3, 2012 (edited) I realize this is old .. but i am trying to use this script .... and well .... I copied everything .. word for word.. the POW does NOT join my group... Nothing ... the CIVI just stands their... I get the prompt to rescue pow.... I click on it ... NOTHING..... The action is also not removed.... I can continue to click over and over on rescue pow's... Just making a simple side mission.. to rescue a scientist... can anyone help me.. I am using Vanilla ARMA2 free.. Edited April 3, 2012 by Lordprimate Unnecessary quote Share this post Link to post Share on other sites
VanhA-ICON 11 Posted April 11, 2012 Try fiddling with this script: http://www.armaholic.com/page.php?id=14488 I've used it myself a couple of times and it works quite well. Share this post Link to post Share on other sites