Earacorn 1 Posted March 16, 2013 I have a line of civilians setup facing a wall and I'm trying to get my line of Opfor infantry to execute all of the civilians.. I tried setting a waypoint to destroy the civilian right in front of each man, but the problem is most of the time they miss and then just stop trying to kill the civilians.. Any ideas? Share this post Link to post Share on other sites
Waffle_SS 11 Posted March 16, 2013 I would try to use a trigger with any of these: "opforguy1 commandFire hostie1;", "opforguy1 doFire hostie1;", "opforguy1 fireAtTarget [hostie1,"WEAPONCLASSNAME"];" I can't confirm if any of these will work right for you, but thats what I dug up from the scripting wiki. Share this post Link to post Share on other sites
johnnyboy 3797 Posted March 17, 2013 There's a few ways to do this. 1. Issue a doTarget command followed by a doFire or commandFire command should work. 2. Another way is to use BluFor as civilians instead. I know this will work. Put this in the init line of a Blufor to make him look like a civilian, and setcaptive true so the the Opfor won't shoot him: // strip the unit removeallweapons this; removeallassigneditems this; Removeuniform this; removeVest this; // dress the unit like a civ this addUniform "U_C_Poloshirt_blue"; // prevent opfor from shooting unit on sight this setCaptive true; Then, when you want the Opfor to shoot the civs, execute this command for every captive: hostage setCaptive false; // replace "hostage" with the hostage unit's name. The Opfor will then brutally mow down all your hostages guaranteed. Share this post Link to post Share on other sites
cobra4v320 27 Posted March 17, 2013 Place 4 civs on the map name them p1 through p4 , set them to special none, place this into their init this setcaptive true; this disableAI "Move", set an enemy unit on the map and group the civs to the enemy unit, make the enemy unit probability of presence to 0% by using the slider. In your trigger place {_x setCaptive false} forEach [p1,p2,p3,p4]. This will make your units fire at the civilians. You may also want to set your firing squad to this setunitpos "up" so they dont lay on the ground. edit: ninja Share this post Link to post Share on other sites
Earacorn 1 Posted March 17, 2013 (edited) There's a few ways to do this.1. Issue a doTarget command followed by a doFire or commandFire command should work. 2. Another way is to use BluFor as civilians instead. I know this will work. Put this in the init line of a Blufor to make him look like a civilian, and setcaptive true so the the Opfor won't shoot him: // strip the unit removeallweapons this; removeallassigneditems this; Removeuniform this; removeVest this; // dress the unit like a civ this addUniform "U_C_Poloshirt_blue"; // prevent opfor from shooting unit on sight this setCaptive true; Then, when you want the Opfor to shoot the civs, execute this command for every captive: hostage setCaptive false; // replace "hostage" with the hostage unit's name. The Opfor will then brutally mow down all your hostages guaranteed. I tried this but when I put // strip the unit removeallweapons this; removeallassigneditems this; Removeuniform this; removeVest this; // dress the unit like a civ this addUniform "U_C_Poloshirt_blue"; // prevent opfor from shooting unit on sight this setCaptive true; It says invalid number in expression... Fixed it derp.. // those are code >< ---------- Post added at 01:50 ---------- Previous post was at 01:37 ---------- Ok :) I got this working, amazing thanks for all the help guys.. I'm making a very fun hostage mission now ---------- Post added at 02:38 ---------- Previous post was at 01:50 ---------- Place 4 civs on the map name them p1 through p4 , set them to special none, place this into their init this setcaptive true; this disableAI "Move", set an enemy unit on the map and group the civs to the enemy unit, make the enemy unit probability of presence to 0% by using the slider. In your trigger place {_x setCaptive false} forEach [p1,p2,p3,p4]. This will make your units fire at the civilians. You may also want to set your firing squad to this setunitpos "up" so they dont lay on the ground.edit: ninja I am going back to this because I am having a few problems.. I want to use civilians because I need my trigger to activate when blufor is detected by OPfor. So far my problem is that when I get detected they turn their attention straight to me and shoot.. I want them to turn their attention to the hostages and open fire on them instead. I'm not sure why I should set presence to 0% because then the enemy units do not spawn in.. What am I missing? Edited March 17, 2013 by Earacorn oops Share this post Link to post Share on other sites
cobra4v320 27 Posted March 17, 2013 You want to group the civs to one bad guy and set his presence to 0%, you can put him anywhere on or off the map. The rest of the guys should be presence 100%. So far my problem is that when I get detected they turn their attention straight to me and shoot.. Well in that case if the priority is killing the hostages make a trigger where the civs become setcaptive false and your rescue team setcaptive true, you can then do a conditional trigger where if all the hostages are dead the on activation would be rescue team setcaptive false returning them back to normal. Share this post Link to post Share on other sites
Earacorn 1 Posted March 17, 2013 This is what I ended up trying in the end. Civs lined up 1 op for each civ and a trigger with this script in the activation (set for blufor detected by opfor). o1=opfor1, C1=civ1 c1 setcaptive false; o1 dofire c1; c2 setcaptive false; o2 dofire c2; c3 setcaptive false; o3 dofire c3; c4 setcaptive false; o4 dofire c4; c5 setcaptive false; o5 dofire c5; c6 setcaptive false; o6 dofire c6; So far it works perfectly as soon as I'm spotted they turn to their hostage and open fire then quickly turn to me. Thank you all for your help :) Share this post Link to post Share on other sites
cobra4v320 27 Posted March 17, 2013 Try this out http://rapidshare.com/files/1397688271/Hostages.zip Share this post Link to post Share on other sites
Earacorn 1 Posted March 17, 2013 Very cool man. Gives me tons of ideas. Share this post Link to post Share on other sites
Ice_Rhino 3 Posted August 8, 2013 I just did this in my mission using a trigger grouped to the player using the following command opforguy1 commandFire civie1; The names above have been changed to protect the innocent :) Share this post Link to post Share on other sites
clydefrog 3 Posted August 8, 2013 Anybody tried the InBaseMoves_HandsBehindBack1 animation to get their hands behind their backs? I thought it would look good for something like this. I've tried: this playmove "InBaseMoves_HandsBehindBack1"; this switchmove "InBaseMoves_HandsBehindBack1"; and this playmove "InBaseMoves_HandsBehindBack1"; this disableAI "ANIM"; and none of them work. Is it a problem with the anim or am I doing something wrong? Share this post Link to post Share on other sites
Ice_Rhino 3 Posted August 9, 2013 Try this outhttp://rapidshare.com/files/1397688271/Hostages.zip I would love to see the contents of your Hostages.zip file. Any chance you could make it available again or email it to me? Thanks Share this post Link to post Share on other sites
Magirot 14 Posted August 10, 2013 Anybody tried the InBaseMoves_HandsBehindBack1 animation to get their hands behind their backs? I thought it would look good for something like this. I've tried:[...] and none of them work. Is it a problem with the anim or am I doing something wrong? Try setting them through a trigger, if I recall the game executes unit initialisations too early for them to run animations. You can simply create a new trigger with "true" as its condition, and then have unitname switchMove "InBaseMoves_HandsBehindBack1"; as the onAct. Share this post Link to post Share on other sites
clydefrog 3 Posted August 10, 2013 Try setting them through a trigger, if I recall the game executes unit initialisations too early for them to run animations.You can simply create a new trigger with "true" as its condition, and then have unitname switchMove "InBaseMoves_HandsBehindBack1"; as the onAct. I did it through a script in the end as I was going to do anyways and it worked fine, but yeah in the inits it does nothing probably due to the reason you mentioned. Share this post Link to post Share on other sites
jandrews 116 Posted September 6, 2013 Hey Cobra could you fix the link I would like to see your zip file Share this post Link to post Share on other sites
hajimoto 10 Posted September 7, 2013 Try this outhttp://rapidshare.com/files/1397688271/Hostages.zip Can I second the motion for a request to an updated link to the zip file that contains the example SQF? ;) Share this post Link to post Share on other sites
jandrews 116 Posted September 27, 2013 bump... can you fix the link? Share this post Link to post Share on other sites
cobra4v320 27 Posted September 27, 2013 Im not sure of how I missed all these requests, I no longer have that file. I will see if I can put something together, but like I said in that other thread there are TONS of hostage missions. Share this post Link to post Share on other sites
cobra4v320 27 Posted September 28, 2013 (edited) Okay here is an example hostage mission (quick and dirty version) http://www.mediafire.com/download/z8g7323go2cfwta/hostages_example.Stratis.pbo You start with a team of 3 guys and must rescue two hostages. If time runs out the hostages will be executed. If you are detected the hostages will be executed. This is run by an FSM named hostages.fsm. After you have killed the guards and rescued the two hostages a rescue helicopter will automatically come in, you can always change this to however you want. If it is dark out a chemlight will be at the extract location, if it is daytime a green smoke will be at the extraction. Let me know if this works out for you. You can select the type of extraction helicopter from the init.sqf. Also all the tasks are run by the ingame modules. The guards are using the BIS_fnc_ambientAnimCombat function. Edited September 28, 2013 by cobra4v320 Share this post Link to post Share on other sites
HaZZarD 2 Posted September 28, 2013 Okay here is an example hostage mission (quick and dirty version)http://www.mediafire.com/download/z8g7323go2cfwta/hostages_example.Stratis.pbo You start with a team of 3 guys and must rescue two hostages. If time runs out the hostages will be executed. If you are detected the hostages will be executed. This is run by an FSM named hostages.fsm. After you have killed the guards and rescued the two hostages a rescue helicopter will automatically come in, you can always change this to however you want. If it is dark out a chemlight will be at the extract location, if it is daytime a green smoke will be at the extraction. Let me know if this works out for you. You can select the type of extraction helicopter from the init.sqf. Also all the tasks are run by the ingame modules. The guards are using the BIS_fnc_ambientAnimCombat function. thanks mate this template is GREAT I had only the problem of the heli not coming to evac Share this post Link to post Share on other sites
cobra4v320 27 Posted September 28, 2013 Yes some how i put in the wrong helicopter name in the init.sqf ExtractHeliType = "MH9 B_Heli_Light_01_F" Just change it to ExtractHeliType = "B_Heli_Light_01_F"; Share this post Link to post Share on other sites
HaZZarD 2 Posted September 28, 2013 Yes some how i put in the wrong helicopter name in the init.sqf ExtractHeliType = "MH9 B_Heli_Light_01_F"Just change it to ExtractHeliType = "B_Heli_Light_01_F"; ok thanks for the reply , so I just need to put there the class name I need Share this post Link to post Share on other sites
cobra4v320 27 Posted September 28, 2013 Yes whatever classname you want, not many options at the moment. Share this post Link to post Share on other sites