Jump to content

Fumbles88

Member
  • Content Count

    29
  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

10 Good

About Fumbles88

  • Rank
    Private First Class
  1. Hi mate, I was just up Goat Fell on Saturday and managed to get lost so a good day all in all :D Thanks for your response and sorry it's taken me so long to get back to you, your time has been very much appreciated. I'll be having a read through your reply and doing some experimenting during the week and I'll get back to you guys to let you know if I've had any problems! Cheers again.
  2. Hi Guys, I've done a search so I truly apologise if I have missed something. I'm wondering if there is anyway to scale down my terrain. I am wanting to build an island based around the geography of the Isle of Arran - I have obtained my DEM file but obviously the Isle of Arran is rather large and will not fit even into 20480 x 20480 (Either way this would be waaaaay to big for a first time project). I am wondering if I can take my DEM file, import it into L3DT (or Global Mapper), at it's rather large size and then scale the height map down so that say it fits onto a 5120 x 5120 or 10240 x 10240 terrain which I could then generate a sat map/attribute map for in L3DT. Thanks
  3. Right guys, sorry for the delay however we tested this out yesterday with several of us and it worked. Thank you very much for your time Animus - it has all been very very much appreciated :)!
  4. Sorry guys, still have not been able to test due to dedi server issues - will keep everyone posted.
  5. Sorry for not responding quicker, I cannot comment on whether or not this has fixed the issue 100% yet (Although logically looking at the code it should have) - once we test it properly during the training, hopefully later today, I will report back here as to whether or not this issue is solved and can be closed.
  6. Didn't work I'm afraid :( Clicked set location without any issue however when we then clicked 'teleport' nothing happened - any ideas?
  7. [sOLVED!] Hi guys, Very sorry if something like this has been posted before - I have searched and there are an insurmountable amount of teleport threads but of the many I looked at I could not find one that matched my problem/criteria. I am making a mission that is to be used for practice/teaching unit members how to navigate and get their bearings without being able to see their location on the map or use a GPS. The idea is that the instructor can go up to a placed flagpole, at base, and select 'set location' - at this point I have a script that will randomly assign a location that is within a 1.5~2Km radius from the "Objective" marker. At the Objective marker is a small 'base' which they must make their way to in order to successfully complete the training. Once this has been done, each individual can click on 'teleport' on the flagpole and will be spawned to the same location until, once again, someone selects 'set location' which will create yet another random location for everyone else to spawn to. I have had tried what feels like several thousand versions of this script and the closest I have been able to get is each person teleporting to completely different locations - despite the fact 'set location' had only been set once. I've done several teleport scripts before but never one that predetermines a completely random location, to which all players must teleport, without a marker. Any and all help will be most gratefully accepted. Below is the code. location.sqf //setPos.sqf by 2Lt M Henderson //For patrolling MkI //PNCOTC 6thAD //Gets a random position to spawn units in at a range of between 1500~2000 //Declare private variables private ["_radius","_randomLocation","_location"]; if (!isServer) exitWith {}; //Set radius for spawn _radius = random(2000); while {_radius < 1500} do { _radius = random(2000); }; _location = getMarkerPos "Objective"; //Generate a random location _randomLocation = [(_location select 0) + _radius * sin(random 359), (_location select 1) + _radius * cos(random 359), (_location select 2) + 0]; //Send result to global variable 'finalLocation' finalLocation = _randomLocation; teleport.sqf //setPos.sqf by 2Lt M Henderson //For patrolling MkI //PNCOTC 6thAD private ["_pole","_unit"]; _pole = _this select 0; _unit = _this select 1; //Spawn Player _unit setPos finalLocation;
  8. Fumbles88

    ACE for OA 1.13

    Hi guys, Did a search of the thread but couldn't find anything else relating to this problem so apologies if I've been incompetent. Building a CN gas chamber however when testing it out my character is in no way responding to the gas, I've tried using BAF and USMC characters and all of them can just stroll through the CN gas like there is nothing there. I am getting no dodgy vision or choking - is this a known issue with a solution? I hope so as it completely ruins any immersion when it's just like walking through a standard smoke grenade. For record I have tested this by both spawning AND throwing (also using UGL) CN canisters/rounds and none of them have any effect even when standing right in the midst of the cloud for over ten seconds. Cheers. EDIT - I have tried Xenon's solution to no avail ["ace_sys_gas_fired", [objNull,"","","","ACE_G_40mm_CS","",projectile]] call CBA_fnc_globalEvent; The script I have is as follows - private ["_gas1","_gas2","_gas3","_gas4","_gas5","_gas6","_gas7","_gas8","_gas9","_gas10","_gas11","_gas12","_gas13","_gas14","_n","_y"]; if (!isServer) exitWith{}; _n = 0; _y = 4; while {_n < _y} do { _gas1 = "ACE_M7A3" createVehicle (getMarkerPos "gas1"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas2 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_1"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas3 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_2"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas4 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_3"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas5 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_4"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas6 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_5"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas7 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_6"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas8 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_7"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas9 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_8"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas10 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_9"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas11 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_10"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas12 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_11"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas13 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_12"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; _gas14 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_13"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",csgas]] call CBA_fnc_globalEvent; sleep 25; deleteVehicle _gas1; deleteVehicle _gas2; deleteVehicle _gas3; deleteVehicle _gas4; deleteVehicle _gas5; deleteVehicle _gas6; deleteVehicle _gas7; deleteVehicle _gas8; deleteVehicle _gas9; deleteVehicle _gas10; deleteVehicle _gas11; deleteVehicle _gas12; deleteVehicle _gas13; deleteVehicle _gas14; _n = _n+1; }; FINAL EDIT: Resolved, I was being a derp. For those of you who are also searching for the answer - the 'reference' that Xenon refers to is what you have named the 'createVehicle' code. Below is the final code so you can see the difference - hope this helps someone else out. private ["_gas1","_gas2","_gas3","_gas4","_gas5","_gas6","_gas7","_gas8","_gas9","_gas10","_gas11","_gas12","_gas13","_gas14","_n","_y"]; if (!isServer) exitWith{}; _n = 0; _y = 4; while {_n < _y} do { _gas1 = "ACE_M7A3" createVehicle (getMarkerPos "gas1"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas1]] call CBA_fnc_globalEvent; _gas2 = "ACE_M7A3" createVehicle (getMarkerPos "_gas2"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas2]] call CBA_fnc_globalEvent; _gas3 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_2"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas3]] call CBA_fnc_globalEvent; _gas4 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_3"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas4]] call CBA_fnc_globalEvent; _gas5 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_4"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas5]] call CBA_fnc_globalEvent; _gas6 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_5"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas6]] call CBA_fnc_globalEvent; _gas7 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_6"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas7]] call CBA_fnc_globalEvent; _gas8 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_7"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas8]] call CBA_fnc_globalEvent; _gas9 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_8"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas9]] call CBA_fnc_globalEvent; _gas10 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_9"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas10]] call CBA_fnc_globalEvent; _gas11 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_10"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas11]] call CBA_fnc_globalEvent; _gas12 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_11"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas12]] call CBA_fnc_globalEvent; _gas13 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_12"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas13]] call CBA_fnc_globalEvent; _gas14 = "ACE_M7A3" createVehicle (getMarkerPos "gas1_13"); ["ace_sys_gas_fired", [objNull,"","","","ACE_M7A3","",_gas14]] call CBA_fnc_globalEvent; sleep 25; deleteVehicle _gas1; deleteVehicle _gas2; deleteVehicle _gas3; deleteVehicle _gas4; deleteVehicle _gas5; deleteVehicle _gas6; deleteVehicle _gas7; deleteVehicle _gas8; deleteVehicle _gas9; deleteVehicle _gas10; deleteVehicle _gas11; deleteVehicle _gas12; deleteVehicle _gas13; deleteVehicle _gas14; _n = _n+1; };
  9. Hi Guys, Did a search on the forum and on google and couldn't find a solution to this answer, sorry if I've overlooked something. Is there a way to 'delete' civilians that have spawned with the ALICE/Civilian module once a unit is no longer within a certain distance? The unit I am a part of has an upcoming Campaign and I have enabled the civilian module and have them spawning when a player unit is within 800 meters. I am however concious of any lag or FPS as we will have several air assets flying over the map and I worry that by the end of missions we will have so many civilians spawned on the map and moving around that it will make the mission(s) unplayable. I've checked the BIKI but can't find any solution - do you guys know of one? Cheers.
  10. Hi guys, I am currently heading up a new campaign for the unit I am involved in. Part of this is going to simulate being on 'the front line' and there will be other forces working alongside us engaging the enemy at different parts of the map (simulating the front line etc). I want to make this campaign as dynamic as possible and I don't want offensives to go down to a 'dice roll' as it will not account for weaponry, ambushes, morale etc. What we're looking at is British Forces taking on Lingorian Rebels so there would be, as I mentioned, balancing issues with a 'dice roll'. I'm wondering if anyone has ever made a 'simulator' or a 'predictor' for firefights, ie you input how many of each side, weaponry, armour, support etc which will then simulate 100 times or so and give the most likely outcome. I've searched online and obviously my search has not come out good so I doubt that there is one in existence. Failing no one having one of these can anyone give me any kind of suggestions as to how I could go about modelling this? I have basic C, C++ and a higher end knowledge of .SQF for scripting in game. Cheers for any help you guys can give me, it's much appreciated.
  11. Awesome, can't believe I never thought of that. It works - you just saved my bacon mate! For those who want to use this script - here is the finished 'solution' //setPos.sqf by 2lt M Henderson [6thAB] //18/08/2013 for patrolling MkI & misdrop-training //PNCOTC 6thAD private ["_radius","_locationx","_locationy","_locationz","_finalLocation","_pole","_unit"]; _pole = _this select 0 ; _unit = _this select 1; //Get objective marker position _locationx = getMarkerPos "Objective" select 0; _locationy = getMarkerPos "Objective" select 1; _locationz = getMarkerPos "Objective" select 2; //Set radius for spawn _radius = random(2500); while {_radius < 1500} do { _radius = random(2500); }; //Spawn Player _finalLocation = [(_locationx) + _radius * sin(random 359), (_locationy) + _radius * cos(random 359), (_locationz) + 100]; _unit setPos _finalLocation; _unit addweapon "ACE_ParachuteRoundPack"; _unit execVM "\x\ace\addons\sys_eject\jumpout_cord.sqf";
  12. RESOLVED - See third post for finished script. Hi, I've seen similar threads regarding addAction and Teleporting however seeing as I'm not essentially using a teleporting position that is 'set in stone' I want to find out if I have made some obvious mistakes. The script is semi-urgent as I need/desire to use it for tonight's training session. The idea is that when they click on 'teleport' on the flagpole they are teleported between 1.5 and 2.5km from the 'objective' marker. They spawn 100m in the air and perform a pseudo t-10 static line drop. This works flawlessly in the editor however when I put it on a server for testing, no one can use it - we just click on 'teleport' and nothing happens. Script is as follows - //setPos.sqf by 2lt M Henderson [6thAB] //18/08/2013 for patrolling MkI & misdrop-training //PNCOTC 6thAD private ["_radius","_locationx","_locationy","_locationz","_finalLocation","_pole","_unit"]; //Set if server condition if (!isServer) exitWith{}; _pole = _this select 0 ; _unit = _this select 1; //Get objective marker position _locationx = getMarkerPos "Objective" select 0; _locationy = getMarkerPos "Objective" select 1; _locationz = getMarkerPos "Objective" select 2; //Set radius for spawn _radius = random(2500); while {_radius < 1500} do { _radius = random(2500); }; //Spawn Player _finalLocation = [(_locationx) + _radius * sin(random 359), (_locationy) + _radius * cos(random 359), (_locationz) + 100]; _unit setPos _finalLocation; _unit addweapon "ACE_ParachuteRoundPack"; _unit execVM "\x\ace\addons\sys_eject\jumpout_cord.sqf"; Any help would be much appreciated guys as this has me tearing my hair out! EDIT: I would just like to add that I have already tried calling it as 'player' as opposed to _unit but that did not work either.
  13. Fumbles88

    Dynamic Spawn help

    Fantastic, can't believe I'd overlooked that. It's great to have a fresh set of eyes who can see your silly errors haha. Thank you so much for your time and assistance, the script is up and running now. For anyone who may wish to use this for learning or tweaking etc, here is the final code. //Created by Mark Henderson (Pte. M. Henderson [6thAB] //3 Oct 2012 //Script for use with Faysh Kabur only //Spawns enemies from pool when blufor is a certain distance from marker using trigger. //Armour chance low //Veh + static chance medium //Infantry chance high //Call using nul = ["MarkerName"] execVM "Scripts\spawn.sqf"; //Version 1.01 //Declare Private variables private ["_enemyFootPool","_enemyArmPool","_enemyVehPool","_enemyStatPool","_footNumberSpawn","_ArmNumberSpawn","_VehNumberSpawn","_enemyFootPoolCount","_enemyArmPoolCount","_enemyVehPoolCount","_enemyStatPoolCount","_spawnedUnit","_ArmType","_VehType","_spawnedVehUnit","_StatType","_spawnedStatUnit","_i","_y","_z","_StatNumberSpawn","_FootType","_spawnedArmUnit","_location","_b","_grp"]; //Set Variable of Marker triggered _location = _this select 0; //Enemy pools in form of array, then counted _enemyFootPool = ["TK_Soldier_AA_EP1","TK_Soldier_AAT_EP1","TK_Soldier_AMG_EP1","TK_Soldier_HAT_EP1", "TK_Soldier_AR_EP1","TK_Commander_EP1","TK_Soldier_Crew_EP1","TK_Soldier_Engineer_EP1", "TK_Soldier_GL_EP1","TK_Soldier_MG_EP1","TK_Soldier_Medic_EP1","TK_Soldier_Officer_EP1", "TK_Soldier_EP1","TK_Soldier_B_EP1","TK_Soldier_LAT_EP" ,"TK_Soldier_AT_EP1" ,"TK_Soldier_Sniper_EP1", "TK_Soldier_SniperH_EP1","TK_Soldier_Sniper_Night_EP1"," TK_Soldier_TWS_EP1","TK_Soldier_Spotter_EP1","TK_Soldier_SL_EP1", "TK_Special_Forces_MG_EP1", "TK_Special_Forces_EP1", "TK_Special_Forces_TL_EP1"]; _enemyFootPoolCount = count _enemyFootPool; _enemyArmPool = ["BMP2_TK_EP1"," BMP2_HQ_TK_EP1","BRDM2_TK_EP1","BRDM2_ATGM_TK_EP1","BTR60_TK_EP1", "M113_TK_EP1","T34_TK_EP1","T55_TK_EP1","T72_TK_EP1","ZSU_TK_EP1"]; _enemyArmPoolCount = count _enemyArmPool; _enemyVehPool = ["GRAD_TK_EP1","LandRover_MG_TK_EP1","LandRover_SPG9_TK_EP1","UAZ_Unarmed_TK_EP1", "UAZ_AGS30_TK_EP1","UAZ_MG_TK_EP1"]; _enemyVehPoolCount = count _enemyVehPool; _enemyStatPool = ["Igla_AA_pod_TK_EP1", "AGS_TK_EP1", "D30_TK_EP1", "KORD_high_TK_EP1","KORD_TK_EP1", "Metis_TK_EP1", "2b14_82mm_TK_EP1","ZU23_TK_EP1"]; _enemyStatPoolCount = count _enemyStatPool; //pick random number of each pool to spawn hint "1"; //First if is for larger cities and towns if ((_location == "Tall") || (_location == "faysh") || (_location == "mish") || (_location == "gerb")) then { _footNumberSpawn = round (random 30); _ArmNumberSpawn = round (random 1); _VehNumberSpawn = round (random 3); _StatNumberSpawn = round (random 3); if (_footNumberSpawn <= 15) then { _footNumberSpawn = _footNumberSpawn + 15; }; if (_VehNumberSpawn < 1) then { _VehNumberSpawn = _VehNumberSpawn + round (random 1); }; if (_StatNumberSpawn < 2) then { _StatNumberSpawn = _StatNumberSpawn + round (random 1); }; hint "2"; } //Else sets numbers for smaller towns and villages. else { _footNumberSpawn = round (random 10); _ArmNumberSpawn = round (random 1); _VehNumberSpawn = round (random 2); _StatNumberSpawn = round (random 2); if (_footNumberSpawn <= 5) then{ _footNumberSpawn = _footNumberSpawn + 5; }; if (_ArmNumberSpawn == 1) then { _ArmNumberSpawn - round (random 1); }; }; hint format ["3 %1", _footNumberSpawn]; sleep 2; //Set Counter _i = 0; //While loop, selects random unit from pool arrays and spawns with UPS in init while {_i < _footNumberSpawn} do { _FootType = _enemyFootPool select (round (random _enemyFootPoolCount)); _grp = createGroup east; _spawnedUnit = _grp createUnit [_FootType, getMarkerPos _location, [], 0, "NONE"]; _spawnedUnit setVehicleInit "nul = [this, _location, 'Random'] execVM 'Scripts\ups.sqf';"; processInitCommands; _i + 1; }; hint "4"; sleep 2; //Count for armour _b = 0; //While loop now for armour while {_b < _ArmNumberSpawn} do { _ArmType = _enemyArmPool select (round (random _enemyArmPoolCount)); _spawnedArmUnit = createVehicle [_ArmType, getMarkerPos _location, [], 0, "NONE"]; _spawnedArmUnit setVehicleInit "nul = [this, _location, 'Random'] execVM 'Scripts\ups.sqf';"; processInitCommands; _b + 1; }; sleep 2; hint "5"; //Count for vehicles _y = 0; //While loop for vehicles while {_y < _VehNumberSpawn} do { _VehType = _enemyVehPool select (round (random _enemyVehPoolCount)); _spawnedVehUnit = createVehicle [_VehType, getMarkerPos _location, [], 0, "NONE"]; _spawnedVehUnit setVehicleInit "nul = [this, _location, 'Random'] execVM 'Scripts\ups.sqf';"; processInitCommands; _y + 1; }; sleep 2; hint "6"; //Set counter for statics _z = 0; //While loop for statics while {_z < _StatNumberSpawn} do { _StatType = _enemyStatPool select (round (random _enemyStatPoolCount)); _spawnedStatUnit = createVehicle [_StatType, getMarkerPos _location, [], 0, "NONE"]; _spawnedStatUnit setVehicleInit "nul = [this, _location, 'Random'] execVM 'Scripts\ups.sqf';"; processInitCommands; _z + 1; }; sleep 2; hint "Complete";
  14. Fumbles88

    Dynamic Spawn help

    Hi, Cheers for your response; I've tried what you recommended and I'm now getting an error on line 56 - which is if ((_location = "Tall") || (_location = "faysh") || (_location = "mish") || (_location = "gerb")) Can anyone see what is wrong here? It gives the generic 'missing )' error but I can't see what I'm missing. Cheers again guys.
  15. Hi guys, I have been working on a script for the Fayshkabur map. Basically I want it to only spawn and random amount and type of enemies when BLUFOR come into the trigger area. I am executing the UPS script in the init of each of these units also which will allow for random placement within the marker areas of the towns and cities. Basically I have been having a bit of trouble finding the error in this code - I have been tweaking now for the last few days to see if I can get it to work but I must confess and admit that I need a fresh pair of eyes to help me out. Here is my code so far. //Created by Mark Henderson (Pte. M. Henderson [6thAB] //3 Oct 2012 //Script for use with Faysh Kabur only //Spawns enemies from pool when blufor is a certain distance from marker using trigger. //Armour chance low //Veh + static chance medium //Infantry chance high //Call using nul = ["MarkerName"] execVM "Scripts\spawn.sqf"; //Version 1.10 //Declare Private variables private ["_enemyFootPool","_enemyArmPool","_enemyVehPool","_enemyStatPool","_footNumberSpawn","_ArmNumberSpawn", "_VehNumberSpawn","_enemyArmPoolCount","_enemyVehPoolCount","_enemyStatPoolCount","_spawnedUnit","_ArmType", "_VehType","_StatType","_spawnedStatUnit","_i","_y","_z","_StatNumberSpawn","_FootType","_spawnedArmUnit","_location", "_ArmUnit","_b","_spawnedVehUnit","_VehUnit","_enemyFootPoolCount"]; //Set Variable of Marker triggered _location = _this select 0; //Enemy pools in form of array, then counted _enemyFootPool = ["TK_Soldier_AA_EP1","TK_Soldier_AAT_EP1","TK_Soldier_AMG_EP1","TK_Soldier_HAT_EP1", "TK_Soldier_AR_EP1","TK_Commander_EP1","TK_Soldier_Crew_EP1","TK_Soldier_Engineer_EP1", "TK_Soldier_GL_EP1","TK_Soldier_MG_EP1","TK_Soldier_Medic_EP1","TK_Soldier_Officer_EP1", "TK_Soldier_EP1","TK_Soldier_B_EP1","TK_Soldier_LAT_EP" ,"TK_Soldier_AT_EP1" ,"TK_Soldier_Sniper_EP1", "TK_Soldier_SniperH_EP1","TK_Soldier_Sniper_Night_EP1"," TK_Soldier_TWS_EP1","TK_Soldier_Spotter_EP1","TK_Soldier_SL_EP1", "TK_Special_Forces_MG_EP1", "TK_Special_Forces_EP1", "TK_Special_Forces_TL_EP1"]; _enemyFootPoolCount = count _enemyFootPool; _enemyArmPool = ["BMP2_TK_EP1"," BMP2_HQ_TK_EP1","BRDM2_TK_EP1","BRDM2_ATGM_TK_EP1","BTR60_TK_EP1", "M113_TK_EP1","T34_TK_EP1","T55_TK_EP1","T72_TK_EP1","ZSU_TK_EP1"]; _enemyArmPoolCount = count _enemyArmPool; _enemyVehPool = ["GRAD_TK_EP1","LandRover_MG_TK_EP1","LandRover_SPG9_TK_EP1","UAZ_Unarmed_TK_EP1", "UAZ_AGS30_TK_EP1","UAZ_MG_TK_EP1"]; _enemyVehPoolCount = count _enemyVehPool; _enemyStatPool = ["Igla_AA_pod_TK_EP1", "AGS_TK_EP1", "D30_TK_EP1", "KORD_high_TK_EP1","KORD_TK_EP1", "Metis_TK_EP1", "2b14_82mm_TK_EP1","ZU23_TK_EP1"]; _enemyStatPoolCount = count _enemyStatPool; //pick random number of each pool to spawn hint "1"; //First if is for larger cities and towns if ((_location == "Tall") || (_location == "faysh") || (_location == "mish") || (_location == "gerb")) then { _footNumberSpawn = round (random 30); _ArmNumberSpawn = round (random 1); _VehNumberSpawn = round (random 3); _StatNumberSpawn = round (random 3); if (_footNumberSpawn <= 15) then { _footNumberSpawn = _footNumberSpawn + 15; }; if (_VehNumberSpawn < 1) then { _VehNumberSpawn = _VehNumberSpawn + round (random 1); }; if (_StatNumberSpawn < 2) then { _StatNumberSpawn = _StatNumberSpawn + round (random 1); }; hint "2"; } //Else sets numbers for smaller towns and villages. else { _footNumberSpawn = round (random 15); _ArmNumberSpawn = round (random 1); _VehNumberSpawn = round (random 2); _StatNumberSpawn = round (random 2); if (_footNumberSpawn <= 8) then{ _footNumberSpawn = _footNumberSpawn + 5; }; if (_ArmNumberSpawn == 1) then { _ArmNumberSpawn - round (random 1); }; }; hint "3"; sleep 2; if (true) then { //Set Counter _i = 0; //While loop, selects random unit from pool arrays and spawns with UPS in init while {_i < _footNumberSpawn} do { _FootType = _enemyFootPool select (round (random _enemyFootPoolCount)); _spawnedUnit = [getMarkerPos _location, EAST, [_FootType]] call BIS_fnc_spawnGroup; {_x setVehicleInit "nul = [this, _location, 'Random'] execVM 'Scripts\ups.sqf';"} forEach units _spawnedUnit; hint format ["3, %1, %2", _footNumberSpawn, _i]; _i = _i + 1; processInitCommands; }; hint "4"; //Count for armour _b = 0; //While loop now for armour while {_b < _ArmNumberSpawn} do { _ArmType = _enemyArmPool select (round (random _enemyArmPoolCount)); _spawnedArmUnit = [getMarkerPos _location, 180, _ArmType, EAST] call bis_fnc_spawnvehicle; _ArmUnit = _spawnedArmUnit select 0; {_x setVehicleInit "nul = [this, _location, 'Random'] execVM 'Scripts\ups.sqf';"} forEach units _ArmUnit; _b = _b + 1; processInitCommands; }; hint "5"; //Count for vehicles _y = 0; //While loop for vehicles while {_y < _VehNumberSpawn} do { _VehType = _enemyVehPool select (round (random _enemyVehPoolCount)); _spawnedVehUnit = [getMarkerPos _location, 180, _VehType, EAST] call bis_fnc_spawnvehicle; _VehUnit = _spawnedVehUnit select 0; {_x setVehicleInit "nul = [this, _location, 'Random'] execVM 'Scripts\ups.sqf';"} forEach units _VehUnit; _y = _y + 1; processInitCommands; }; hint "6"; //Set counter for statics _z = 0; //While loop for statics while {_z < _StatNumberSpawn} do { _StatType = _enemyStatPool select (round (random _enemyStatPoolCount)); _spawnedStatUnit = createVehicle [_StatType, getMarkerPos _location, [], 0, "NONE"]; _spawnedStatUnit setVehicleInit "nul = [this, _location, 'Random'] execVM 'Scripts\ups.sqf';"; nul = [_spawnedUnit, _spawnedStatUnit] execVM "Scripts\man.sqf"; _z = _z + 1; processInitCommands; }; hint "Complete"; }; Cheers for any help that you can give me. EDIT: This is all now solved and has gone through a few changes since. I have uploaded the latest working version so that others may learn from it, use it and improve upon it etc.
×