Sasuke 1 Posted February 28, 2013 (edited) Hi, I'm working on a mission for a friend in which upon completion of the mission, you're ambushed on the RTB (To teach our units a good lesson, as they always seem to go 'Casual' on the ride home.) and it works really well with IED's and RPG's and such. Only problem is, you take the same route out as the same route you come back in. I need the ambush to spawn after a radio tower and General have been disposed of. Here's an image of what the ambush will be. https://dl.dropbox.com/u/145942019/arma2oa%202013-02-24%2021-20-36-10.bmp (3840 kB) Any help? Thanks, SGT M. Sasuke 1st LAR Nightmare Actual (By the way, you may have to download the image to get it to work. Right Click >> Save Target As >> Select Desktop in the Dropdown box >> Save) Edited February 28, 2013 by Sasuke Image Support Share this post Link to post Share on other sites
tryteyker 27 Posted February 28, 2013 Make a trigger with condition !alive general && !alive radiotower Then execute the script with the ambush (spawn the units dynamically) Share this post Link to post Share on other sites
Sasuke 1 Posted February 28, 2013 Ok, that helps a lot, but the biggest problem is making a script that spawns in certain units, an IED and have the units have multiple waypoints that work with an ambush. Share this post Link to post Share on other sites
tryteyker 27 Posted February 28, 2013 Play around with createUnit and createVehicle, addEventHandler etc etc etc, I'd make a script for you but I'm in class at the moment so I don't have time for that. Share this post Link to post Share on other sites
Sasuke 1 Posted February 28, 2013 Ok, thanks for the help. I'll find the classnames and stuff and see what I can do. The only downside is I'm still not sure with spawning waypoints at the same time, but I'll get to work on it. Thanks again. Share this post Link to post Share on other sites
2nd ranger 275 Posted February 28, 2013 You can use addWaypoint and associated commands for that, but I find it simpler to use copyWaypoints. Share this post Link to post Share on other sites
Sasuke 1 Posted February 28, 2013 Would it work to setup the ambush, set all probs of presence to 0%, add !alive general && !alive radiotower and name the tower Raditower, make it setoff the Sqf when the tower is destroyed, have the SQF spawn in units that copy all the waypoints from the 0% units, then spawn in the IED? Share this post Link to post Share on other sites
2nd ranger 275 Posted February 28, 2013 Yes. To use copyWaypoints you just need one unit with an init line like AmbushPlan1 = Group this; deleteVehicle this; Then after you spawn a group, newGroupName copyWaypoints AmbushPlan1; Share this post Link to post Share on other sites
Sasuke 1 Posted March 1, 2013 That is so much simpler than I thought. Thank you so much! ---------- Post added at 15:27 ---------- Previous post was at 15:17 ---------- One problem; naming a created group with the CreateGroup command. Can't find anything on the syntax list... Although it works with CreateUnit. And editing the Init of the unit too, to add something like this "groupnamehere = group this;" To make it work... Any suggestions? Share this post Link to post Share on other sites
2nd ranger 275 Posted March 1, 2013 (edited) Use BIS_fnc_spawnGroup (Functions module must be placed) NewGroupName = [ getmarkerPos "Spawn1", EAST, [color="#FF0000"](configFile >> "CfgGroups" >> "East" >> "BIS_TK" >> "Infantry" >> "TK_InfantrySquad")[/color], [], [], [0.5, 1], //---Skill range [0.5, 1], //---Ammunition range [5, 0.5], //---Randomization - min. 5 units, 50% chance of others spawning 150 //---Direction ] call BIS_fnc_spawnGroup; Red section could also be an array of classes to choose from [ "TK_INS_Bonesetter_EP1", "TK_INS_Soldier_2_EP1", "TK_INS_Soldier_EP1", "TK_INS_Soldier_5_EP1", "TK_INS_Soldier_3_EP1", "TK_INS_Soldier_TL_EP1" ], In which case the max. number of units would be the number of classes contained in the array. Groups Classlists Edited March 1, 2013 by 2nd Ranger Share this post Link to post Share on other sites
XCess 0 Posted March 1, 2013 I always went with sync'd waypoints for ambushes. Have them set to stealth, hold fire, sync it to a tigger and change ther firemodes and such in their next waypoint. Felt less cheaty :p Share this post Link to post Share on other sites