jandrews 116 Posted March 17, 2015 was wondering if anyone has spawned UAV or UGV randomly in mission to hover around players and provide CAS or ground support respectively and then delete once either ammo or fuel is empty? Not worried about having to connect to terminal just wanting some drone support. Would like to have it randomly spawned based on set timer. (I suppose this could be as easy as using a trigger set to anyone and repeatedly with countdown timer set. I know how to createvehicle flying and set behavior etc... but wondering about the hover, delete part and randomly spawned on timer. oh, I did google it, nothing came up to this specific thing. Share this post Link to post Share on other sites
austin_medic 109 Posted March 17, 2015 you want this for a darter or the big UAV that has weapons? Share this post Link to post Share on other sites
jandrews 116 Posted March 17, 2015 you want this for a darter or the big UAV that has weapons? Hey man, would love an armed UAV or UGV that could do this. Wasn't sure if it would need to spawn with its units or if alone and set parameters. I suppose an armed CAS UAV/UGV spawning every 60 min around squad leader, hovering at 200 m radius and a ceiling of 200-300 m patrolling for enemies w/ combat mode RED and speed normal, may be leave and "rearm/refit" once bingo on ammo / fuel and returns in say 60 min or so. Not too sure, it could be several things but.... not sure about making the script. Thanks for any help. This mission idea I have is that NATO is only providing arms and unmanned drone attacks for guerrilla units. So the players don't need to have comms with the drone as "nato" is operating it. There is another type script out there, DMC for air patrols, I could look into that and see if I can get some ideas. Share this post Link to post Share on other sites
austin_medic 109 Posted March 18, 2015 Hey man, would love an armed UAV or UGV that could do this. Wasn't sure if it would need to spawn with its units or if alone and set parameters. I suppose an armed CAS UAV/UGV spawning every 60 min around squad leader, hovering at 200 m radius and a ceiling of 200-300 m patrolling for enemies w/ combat mode RED and speed normal, may be leave and "rearm/refit" once bingo on ammo / fuel and returns in say 60 min or so. Not too sure, it could be several things but.... not sure about making the script.Thanks for any help. This mission idea I have is that NATO is only providing arms and unmanned drone attacks for guerrilla units. So the players don't need to have comms with the drone as "nato" is operating it. There is another type script out there, DMC for air patrols, I could look into that and see if I can get some ideas. I was working on a little FSM to have a drone follow around a specific unit, though I question how effective it will be with the UAV plane since it moves quite fast... Ground drones might get side tracked with enemies to shoot at https://www.dropbox.com/s/m7khknojrua89oh/droneFollow.fsm?dl=0 pass params [your-drone,unit-to-follow-height-to-follow-at] execFSM "droneFollow.fsm"; Share this post Link to post Share on other sites
jandrews 116 Posted March 18, 2015 I was working on a little FSM to have a drone follow around a specific unit, though I question how effective it will be with the UAV plane since it moves quite fast... Ground drones might get side tracked with enemies to shoot athttps://www.dropbox.com/s/m7khknojrua89oh/droneFollow.fsm?dl=0 pass params [your-drone,unit-to-follow-height-to-follow-at] execFSM "droneFollow.fsm"; Ok, well I have no understanding of fsm so I will try it. I tried this the call line in a trigger activation line and it didnt work, I removed "" and the 2nd (,) and still got error. Not sure if I am using this line correctly. ["B_UAV_02_CAS_F",unit1,150] execFSM "droneFollow.fsm"; Lastly, not really sure I care about the drones getting off track or being too fast, I really only want the feel of a drone from Nato assisting from far away, destroying some bad guys and of course for the ambiance. thanks for the help! Share this post Link to post Share on other sites
austin_medic 109 Posted March 18, 2015 Ok, well I have no understanding of fsm so I will try it. I tried this the call line in a trigger activation line and it didnt work, I removed "" and the 2nd (,) and still got error. Not sure if I am using this line correctly. ["B_UAV_02_CAS_F",unit1,150] execFSM "droneFollow.fsm"; Lastly, not really sure I care about the drones getting off track or being too fast, I really only want the feel of a drone from Nato assisting from far away, destroying some bad guys and of course for the ambiance. thanks for the help! the drone needs to be spawned already. i.e an object Share this post Link to post Share on other sites
jandrews 116 Posted March 18, 2015 the drone needs to be spawned already. i.e an object ok, does the object need to be close to unit it follows or anywhere on map? I suppose I could spawn it say via a trigger and then apply the call line too? Share this post Link to post Share on other sites
austin_medic 109 Posted March 18, 2015 ok, does the object need to be close to unit it follows or anywhere on map? I suppose I could spawn it say via a trigger and then apply the call line too? Just place a UGV stomper on the 2D editor anywhere on the map. Then in its init line execute the FSM and the UGV will drive to where the unit to follow is. So its init line would look like this: [this,your-unit-to-follow,height-to-follow-at(only-applicible-to-darters-and-planes)] execFSM "droneFollow.fsm"; Share this post Link to post Share on other sites
jandrews 116 Posted March 18, 2015 Just place a UGV stomper on the 2D editor anywhere on the map. Then in its init line execute the FSM and the UGV will drive to where the unit to follow is.So its init line would look like this: [this,your-unit-to-follow,height-to-follow-at(only-applicible-to-darters-and-planes)] execFSM "droneFollow.fsm"; Thanks I will try this later, I may have to createVehicle, I am wanting to have drones spawn in at different times during the mission so I will try and set it up w/ trigger w/ that call line afterwards and see what happens. Thanks for your help!! Share this post Link to post Share on other sites
jshock 513 Posted March 18, 2015 I would use createUnit. Share this post Link to post Share on other sites
jandrews 116 Posted March 19, 2015 (edited) well got it to work, spawns in, flash and gone, then "drone destroyed", anyway to slow it down? I know you used it for darter, will check with UGV next. No luck, both appear and disappear and get "destroyed" update. Edited March 19, 2015 by JAndrews1 Share this post Link to post Share on other sites
austin_medic 109 Posted March 19, 2015 well got it to work, spawns in, flash and gone, then "drone destroyed", anyway to slow it down? I know you used it for darter, will check with UGV next.No luck, both appear and disappear and get "destroyed" update. somebody external is exploding your drone. It's not my FSM blowing it up... It's usable with a UGV as well, all the FSM does is tell it to keep moving to the unit its following over and over. Share this post Link to post Share on other sites
jshock 513 Posted March 19, 2015 Could you go ahead and post up what you have, and where/how your executing and defining each piece? Share this post Link to post Share on other sites
jandrews 116 Posted March 19, 2015 Could you go ahead and post up what you have, and where/how your executing and defining each piece? sure, just testing. Again not sure if this is correct. blufor trigger with nul = [] execVM "spawnUAV.sqf"; in Activation box. _group = createGroup west; _drone = _group createUnit ["B_UAV_02_CAS_F", getPos player, [], 0, "FORM"]; [_drone,unit1,100] execFSM "droneFollow.fsm"; Share this post Link to post Share on other sites
austin_medic 109 Posted March 19, 2015 sure, just testing. Again not sure if this is correct. blufor trigger with nul = [] execVM "spawnUAV.sqf"; in Activation box. _group = createGroup west; _drone = _group createUnit ["B_UAV_02_CAS_F", getPos player, [], 0, "FORM"]; [_drone,unit1,100] execFSM "droneFollow.fsm"; change "FORM" to "FLY" so the UAV will spawn flying in the air and it wont crash and burn. Share this post Link to post Share on other sites
jandrews 116 Posted March 19, 2015 change "FORM" to "FLY" so the UAV will spawn flying in the air and it wont crash and burn. After thought was to do the same, I knew it was something stupid, it usually is when I script stuff. Thanks! Share this post Link to post Share on other sites
jandrews 116 Posted March 19, 2015 change "FORM" to "FLY" so the UAV will spawn flying in the air and it wont crash and burn. hey again, just tested with both these, neither works for me, I am calling them with blufor activated triggers with call lines in Act box, no other units on map, basically I see a flash of possibly the veh and then the "drone destroyed" hint. Not sure if what I am trying is incorrect. But.... I am wondering if "getPos Player" may have something to do with this issue. Not 100%, have to test later when home. Ideas? _group = createGroup west; _drone = _group createUnit ["B_UAV_02_CAS_F", getPos player, [], 0, "FLY"]; [_drone,unit1,100] execFSM "droneFollow.fsm"; _group = createGroup west; _drone1 = _group createUnit ["B_UGV_01_rcws_F", getPos player, [], 0, "NONE"]; [_drone1,unit1,0] execFSM "droneFollow.fsm"; Share this post Link to post Share on other sites
fight9 14 Posted March 19, 2015 You might have to change the Z value of your position array. [(getPos player) select 0, (getPos player) select 1, ((getPos player) select 2) + 100] If you plan on using this mission for MP, then you might not want to use a trigger... They fire on every client. Alternatively, you could define who player should be in the condition. this && player == unit1 Share this post Link to post Share on other sites
jandrews 116 Posted March 19, 2015 You might have to change the Z value of your position array. [(getPos player) select 0, (getPos player) select 1, ((getPos player) select 2) + 100] If you plan on using this mission for MP, then you might not want to use a trigger... They fire on every client. Alternatively, you could define who player should be in the condition. this && player == unit1 I will try that, thanks for the heads up on trigger, I had planned on having it just for SL but still testing this out. I am trying to script another way too. We'll see how it turns out. Share this post Link to post Share on other sites
f2k sel 164 Posted March 20, 2015 I had a go at this but couldn't get it to work either. _drone = _group createUnit ["B_UAV_02_CAS_F", getPos player, [], 0, "NONE"]; using createunit to create a vehicle just seems to make it appear for a split second and then it's either destroyed or just vanishes. when using _Drone = [[(getPos player) select 0, (getPos player) select 1, ((getPos player) select 2) + 100],0,"B_UAV_02_CAS_F",WEST] call BIS_fnc_spawnVehicle; 0=[_Drone select 0,player,10] execFSM "droneFollow.fsm"; The vehicle spawns above the player at 100 meters but it won't follow, I'm not even sure the FSM is even running, I also tried it with a UGV. And an editor placed vehicle and still nothing. Share this post Link to post Share on other sites
jandrews 116 Posted March 20, 2015 Here is what I am attempting, dont know if its written that well or not, anyways, I want the unit to delete when bingo on ammo, just cant seem to find a command to do so, sure there is add and check and etc.... but no _vehicleammo == 0; or at least that I can find in google and biki. Ideas? // nul = [_unitname,true] execVM "SpawnDrone.sqf"; // _unitname = unit to follow // change true to false if you don't want a flying unit _center = _this select 0; _flying = _this select 1; if (_flying) then { _grp = createGroup west; _vehicle = group createUnit ["B_UAV_02_CAS_F", (_center select 0), (_center select 1), ((_center select 2) + 150)], [], 0, "FLY"]; [_vehicle,_center,200] call BIS_fnc_taskPatrol; _vehicle setCombatMode "RED"; _vehicle setBehaviour "AWARE"; _vehicle setSpeedMode "NORMAL"; [{systemChat "Nato UAV CAS inbound"},"BIS_fnc_call",true,false] spawn BIS_fnc_MP; if {_vehicleammo Equalto 0} do { [{systemChat "UAV returning to base for rearm/refit"},"BIS_fnc_call",true,false] spawn BIS_fnc_MP; sleep 3; delete _vehicle; }; } else { _grp = createGroup west; _vehicle = group createUnit ["B_UGV_01_rcws_F", (_center select 0), (_center select 1), [], 0, "NONE"]; [_vehicle,_center,200] call BIS_fnc_taskPatrol; _vehicle setCombatMode "RED"; _vehicle setBehaviour "AWARE"; _vehicle setSpeedMode "NORMAL"; [{systemChat "Nato UGV inbound"},"BIS_fnc_call",true,false] spawn BIS_fnc_MP; if {_vehicleammo Equalto 0} do { [{systemChat "UGV returning to base for rearm/refit"},"BIS_fnc_call",true,false] spawn BIS_fnc_MP; sleep 3; delete _vehicle; }; }; Share this post Link to post Share on other sites
fight9 14 Posted March 20, 2015 (edited) Try this... it uses createVehicle array with createVehicleCrew... The params allow you to try the FSM or BIS function, also. [color="#FF8040"][color="#006400"][i]/* _this select 0: object - unit to follow _this select 1: bool - true for UAV, false for UGV _this select 2: bool - true for FSM, false for fnc_taskPatrol nul = [_unitname,true,true] execVM "SpawnDrone.sqf"; // spawn UAV with FSM nul = [_unitname,false,false] execVM "SpawnDrone.sqf"; // spawn UGV with fnc_taskPatrol */[/i][/color] [color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_unit"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_flying"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_patrol"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_pos"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_group"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_drone"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_fsm"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_fnc"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_msg"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// params [/i][/color] [color="#1874CD"]_unit[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_flying[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_patrol[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]2[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// position and group[/i][/color] [color="#000000"]_pos[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]getPos[/b][/color] [color="#1874CD"]_unit[/color][color="#8B3E2F"][b];[/b][/color] [color="#000000"]_group[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createGroup[/b][/color] [color="#000000"]west[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// spawn drone[/i][/color] [color="#1874CD"]_drone[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]objNull[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#1874CD"]_flying[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_drone[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createVehicle[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"B_UAV_02_CAS_F"[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#000000"]_pos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]_pos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#000000"]_pos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]2[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#FF0000"]150[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"FLY"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_drone[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]createVehicle[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"B_UGV_01_rcws_F"[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#000000"]_pos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#000000"]_pos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#FF0000"]10[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]_pos[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]2[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]0[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"NONE"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]createVehicleCrew[/b][/color] [color="#1874CD"]_drone[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// create crew for drone[/i][/color] [color="#006400"][i]// set behaviour[/i][/color] [color="#1874CD"]_drone[/color] [color="#191970"][b]setCombatMode[/b][/color] [color="#7A7A7A"]"RED"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_drone[/color] [color="#191970"][b]setBehaviour[/b][/color] [color="#7A7A7A"]"AWARE"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_drone[/color] [color="#191970"][b]setSpeedMode[/b][/color] [color="#7A7A7A"]"NORMAL"[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// set patrol type[/i][/color] [color="#191970"][b]if[/b][/color] [color="#1874CD"]_patrol[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_fsm[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_drone[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_unit[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]200[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]execFSM[/b][/color] [color="#7A7A7A"]"droneFollow.fsm"[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_fnc[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#191970"][b]group[/b][/color] [color="#1874CD"]_drone[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]_pos[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]200[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_taskPatrol[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// send message[/i][/color] [color="#191970"][b]if[/b][/color] [color="#1874CD"]_flying[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_msg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Nato UAV CAS inbound"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"systemChat"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_msg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Nato UGV inbound"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"systemChat"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// wait for 0 ammo or 0 fuel or dead[/i][/color] [color="#191970"][b]waitUntil[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]5[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]![/b][/color][color="#8B3E2F"][b]([/b][/color][color="#191970"][b]someAmmo[/b][/color] [color="#1874CD"]_drone[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]or[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]fuel[/b][/color] [color="#1874CD"]_drone[/color] [color="#191970"][b]isEqualTo[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]or[/b][/color] [color="#8B3E2F"][b]![/b][/color][color="#8B3E2F"][b]([/b][/color][color="#191970"][b]alive[/b][/color] [color="#1874CD"]_drone[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]alive[/b][/color] [color="#1874CD"]_drone[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#006400"][i]// if alive[/i][/color] [color="#006400"][i]// send message[/i][/color] [color="#191970"][b]if[/b][/color] [color="#1874CD"]_flying[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_msg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"UAV returning to base for rearm/refit"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"systemChat"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_msg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"UGV returning to base for rearm/refit"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"systemChat"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// delete vehicle[/i][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]3[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]deleteVehicle[/b][/color] [color="#1874CD"]_drone[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#006400"][i]// if dead[/i][/color] [color="#006400"][i]// send message[/i][/color] [color="#191970"][b]if[/b][/color] [color="#1874CD"]_flying[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_msg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"UAV destroyed"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"systemChat"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_msg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"UGV destroyed"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"systemChat"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][/color] Made with KK's SQF to BBCode Converter edit: the "_group = createGroup west;" line is not needed... but KK's converter is hard to edit... Edited March 20, 2015 by Fight9 Share this post Link to post Share on other sites
jandrews 116 Posted March 20, 2015 thanks fight9 !! wow.... I just spent the last 5 minutes reading that code. Thanks, give me something to learn from. I saw the someAmmo in commands but didnt know you could (!) and that would mean empty. cool stuff. thanks again! testing soon. Share this post Link to post Share on other sites
jandrews 116 Posted March 21, 2015 (edited) I hate to say it, but I am using your code for another .sqf. Of course I am getting some errors, but I also have some questions related to spawn group. _this select 3: (optional) list of relative positions (Array) < --- for this, can I have the teams spawn at a distance from the _unit ? if so would I use [x,y,z] or something else? _this select 5: (optional) skill range (Array) < --- for this, do I just use .75 or .75-.85 range for skill? I am getting an error with setting the teams behavior. Any ideas to fix would be grateful! 14:35:59 Error in expression < call BIS_fnc_spawnGroup; }; _snipers setCombatMode "RED"; _snipers setBehavio> 14:35:59 Error position: <setCombatMode "RED"; _snipers setBehavio> 14:35:59 Error setcombatmode: Type Bool, expected Object,Group,Team member 14:35:59 File C:\Users\Andrews\Documents\Arma 3\missions\Drone_test.Stratis\NatoAI.sqf, line 30 code /* _this select 0: object - unit to follow _this select 1: bool - true = snipers, false = recon nul = [_unitname,true] execVM "NatoAI.sqf"; // spawn with fnc_findOverwatch || fnc_taskPatrol */ private ["_unit","_snipers","_pos","_fnc","_msg"]; // params _unit = _this select 0; _snipers = _this select 1; // position and group _pos = getPos _unit; // spawn AI if _snipers then { _team = [_pos, west, (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_SniperTeam"),[],[],[],[],[],(random (360))] call BIS_fnc_spawnGroup; _team1 = [_pos, west, (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_SniperTeam"),[],[],[],[],[],(random (360))] call BIS_fnc_spawnGroup; } else { _team2 = [_pos, west, (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_ReconTeam"),[],[],[],[],[],(random (360))] call BIS_fnc_spawnGroup; _team3 = [_pos, west, (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_ReconTeam"),[],[],[],[],[],(random (360))] call BIS_fnc_spawnGroup; }; // set behaviour _snipers setCombatMode "YELLOW"; _snipers setBehaviour "AWARE"; _snipers setSpeedMode "LIMITED"; // set overwatch || patrol if _snipers then { _fnc = [(_pos), 300, 250, 15] call BIS_fnc_findOverwatch; } else { _fnc = [_snipers,_pos,250] call BIS_fnc_taskPatrol; }; // send message if _snipers then { _msg = ["Nato Snipers providing Overwatch","systemChat",true,false] call BIS_fnc_MP; } else { _msg = ["Nato Recon nearby","systemChat",true,false] call BIS_fnc_MP; }; // wait for dead units waitUntil { sleep 5; !(alive _snipers) }; if _snipers then {// delete teams sleep 3; deleteGroup _team; deleteGroup _team1; _msg = ["Sniper teams eliminated","systemChat",true,false] call BIS_fnc_MP; } else { deleteGroup _team2; deleteGroup _team3; _msg = ["Recon teams eliminated","systemChat",true,false] call BIS_fnc_MP; }; lastly, its spawns (4) groups of recon not (2), why would that be? Edited March 21, 2015 by JAndrews1 Share this post Link to post Share on other sites
fight9 14 Posted March 22, 2015 (edited) That's because you are trying to give a true/false variable combat orders... the error message tells you that. [color="#FF8040"][color="#006400"][i]/* _this select 0: object - unit to follow _this select 1: bool - true = snipers, false = recon nul = [_unitname,true] execVM "NatoAI.sqf"; // spawn with fnc_findOverwatch || fnc_taskPatrol */[/i][/color] [color="#191970"][b]private[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"_unit"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_snipers"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_pos"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_cfg"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_msg"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_team1"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"_team2"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// params [/i][/color] [color="#1874CD"]_unit[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_snipers[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// position and group[/i][/color] [color="#000000"]_pos[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]getPos[/b][/color] [color="#1874CD"]_unit[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_cfg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#191970"][b]configFile[/b][/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"CfgGroups"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"West"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"BLU_F"[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"Infantry"[/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// spawn AI[/i][/color] [color="#1874CD"]_team1[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]grpNull[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_team2[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]grpNull[/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#1874CD"]_snipers[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_team1[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_pos[/color][color="#8B3E2F"][b],[/b][/color] [color="#000000"]west[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_cfg[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"BUS_SniperTeam"[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#191970"][b]random[/b][/color] [color="#FF0000"]360[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_spawnGroup[color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_team2[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_pos[/color][color="#8B3E2F"][b],[/b][/color] [color="#000000"]west[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_cfg[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"BUS_SniperTeam"[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#191970"][b]random[/b][/color] [color="#FF0000"]360[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_spawnGroup[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_team1[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_pos[/color][color="#8B3E2F"][b],[/b][/color] [color="#000000"]west[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_cfg[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"BUS_ReconTeam"[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#191970"][b]random[/b][/color] [color="#FF0000"]360[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_spawnGroup[color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_team2[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_pos[/color][color="#8B3E2F"][b],[/b][/color] [color="#000000"]west[/color][color="#8B3E2F"][b],[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_cfg[/color] [color="#8B3E2F"][b]>[/b][/color][color="#8B3E2F"][b]>[/b][/color] [color="#7A7A7A"]"BUS_ReconTeam"[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#191970"][b]random[/b][/color] [color="#FF0000"]360[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_spawnGroup[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// set behaviour[/i][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#000000"]_x[/color] [color="#191970"][b]setCombatMode[/b][/color] [color="#7A7A7A"]"YELLOW"[/color][color="#8B3E2F"][b];[/b][/color] [color="#000000"]_x[/color] [color="#191970"][b]setBehaviour[/b][/color] [color="#7A7A7A"]"AWARE"[/color][color="#8B3E2F"][b];[/b][/color] [color="#000000"]_x[/color] [color="#191970"][b]setSpeedMode[/b][/color] [color="#7A7A7A"]"LIMITED"[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_team1[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_team2[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// set overwatch || patrol[/i][/color] [color="#191970"][b]if[/b][/color] [color="#1874CD"]_snipers[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]private[/b][/color] [color="#7A7A7A"]"_ow"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_ow[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_pos[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]300[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]250[/color][color="#8B3E2F"][b],[/b][/color] [color="#FF0000"]15[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_findOverwatch[color="#8B3E2F"][b];[/b][/color] [color="#000000"]_x[/color] [color="#191970"][b]move[/b][/color] [color="#1874CD"]_ow[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_team1[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_team2[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]private[/b][/color] [color="#7A7A7A"]"_fnc"[/color][color="#8B3E2F"][b];[/b][/color] [color="#1874CD"]_fnc[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_x[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]_pos[/color][color="#8B3E2F"][b],[/b][/color][color="#FF0000"]250[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_taskPatrol[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#1874CD"]_team1[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_team2[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// send message[/i][/color] [color="#191970"][b]if[/b][/color] [color="#1874CD"]_snipers[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_msg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Nato Snipers providing Overwatch"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"systemChat"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_msg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Nato Recon nearby"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"systemChat"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#006400"][i]// wait for all dead[/i][/color] [color="#191970"][b]waitUntil[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#191970"][b]sleep[/b][/color] [color="#FF0000"]5[/color][color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#191970"][b]alive[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]count[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]([/b][/color][color="#191970"][b]units[/b][/color] [color="#1874CD"]_team1[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]+[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#191970"][b]units[/b][/color] [color="#1874CD"]_team2[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]0[/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color] [color="#191970"][b]if[/b][/color] [color="#1874CD"]_snipers[/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_msg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Sniper teams eliminated"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"systemChat"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]else[/b][/color] [color="#8B3E2F"][b]{[/b][/color] [color="#1874CD"]_msg[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"Recon teams eliminated"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"systemChat"[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]false[/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]call[/b][/color] BIS_fnc_MP[color="#8B3E2F"][b];[/b][/color] [color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][/color] Made with KK's SQF to BBCode Converter EDIT: Optimized code a bit. Edited March 22, 2015 by Fight9 Share this post Link to post Share on other sites