lightspeed_aust 681 Posted August 18, 2011 so i have chopper 1 and in the init field i would put chopper1=group this so then i have a trigger with this in it: null = [chopper1,(getPos this),250] execVM "BIN_taskPatrol.sqf" ??? I really am not a scripter as you can tell lol Share this post Link to post Share on other sites
jedra 11 Posted August 18, 2011 (edited) Hi, Nearly there. In this instance, the following will not work in a trigger; null = [chopper1,(getPos this),250] execVM "BIN_taskPatrol.sqf" Call your chopper something 'Helo1' will do. In it's init line put; chGrp = group this; Then in your trigger do this; null = [chGrp,(getPos helo1),250] execVM "BIN_taskPatrol.sqf"; This will get the help to fly around waypoints around it's own position (getPos helo1). If you want it to fly around elsewhere then you need to give it a different position... null = [chGrp,(getPos [b]player[/b]),250] execVM "BIN_taskPatrol.sqf"; Will get it to create waypoints around the players position. Not tested - I'll give it a whirl myself in a few minutes. EDIT ----> Yep, that works. If you do the following; null = [chGrp,(getPos [b]player[/b]),250[b],1[/b]] execVM "BIN_taskPatrol.sqf"; The ',1' adds debug markers so you can see the points that have been plotted for the patrol. EDIT again - I forgot to say, you need a functions module on the map! Edited August 19, 2011 by Jedra Share this post Link to post Share on other sites
lightspeed_aust 681 Posted August 19, 2011 love it - works perfectly Share this post Link to post Share on other sites
jiltedjock 10 Posted November 11, 2011 (edited) hi, new to Arma II after many years away from PCs. Op Flashpoint was one of the last games I bought for my old P3 450, after many weeks of hacking away at the demo. Am now 2 weeks into ownership of a beast of a PC and rediscovering the joys of hacking around in BI games. I've been using a copy of the script in page 5 of this thread, to generate "patrol" waypoints for groups. sqf is called in the groups' inits, no problem. So that go to me to thinking it would be cool if I could set up a repeatable radio trigger to make selected groups call the script during play. For example you have sent two mech infantry groups to a village, you select them on the map and then choose Radio Alpha and they call the patrol script, and they patrol until you order them to do something else. But - I have tried all sorts of variations of code in the On Activation field and I am hitting a wall of errors. I can't seem to find a way to get the activation to activate the script against the selected units. I was thinking of something like: { _x execVM "complex_patrol.sqf"; } forEach [groupselectedunits]; - except I can't find an array that describes currently selected groups rather than units? Actually I have just had an idea - if I name the groups in the editor I could have separate radio triggers for each group under command and pass in the name of the group as the array? nul=[some_groups_name] execVM "complex_patrol.sqf" Still, it would be nice to be able to do it dynamically based on the player's group selections if anyone knows a way to do that? cheers Edited November 11, 2011 by jiltedjock Share this post Link to post Share on other sites
riouken 15 Posted November 11, 2011 Still, it would be nice to be able to do it dynamically based on the player's group selections if anyone knows a way to do that? cheers Could you give some more info on what you mean by player group selections? Share this post Link to post Share on other sites
Fogu 10 Posted November 11, 2011 Do you mean something like this? http://forums.bistudio.com/showthread.php?t=92480 Share this post Link to post Share on other sites
jiltedjock 10 Posted November 14, 2011 Could you give some more info on what you mean by player group selections? Hi, what I mean is groups that are selected through the High Command Interface eg the commander selects two groups and then selects Radio Alpha, which causes the selected groups to execute the script. I think my original question is a bit of a red herring. It seems that groupSelectedUnits player would return an array of groups, so the challenge is how to pass that array into a command to execute a patol sqf similar to the one on page 5 of the thread. I have played around with it this weekend and am not really getting anywhere with it. Share this post Link to post Share on other sites
lightspeed_aust 681 Posted November 29, 2011 a couple of issues i have with this - a) the chopper seems to crash half the time - like it cant avoid hitting trees - faulty ai. b) i get 4 waypoints right near eachother in a circle but then one about 2 or 3 km away causing chopper to fly off away from the area i want it. thoughts? fixes? Share this post Link to post Share on other sites