Fumbles88
Member-
Content Count
29 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by Fumbles88
-
Shrinking/scaling Height map and other terrain
Fumbles88 replied to Fumbles88's topic in ARMA 3 - TERRAIN - (BUILDER)
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. -
Shrinking/scaling Height map and other terrain
Fumbles88 posted a topic in ARMA 3 - TERRAIN - (BUILDER)
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 -
Teleport location using a secondary script [No Marker]
Fumbles88 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
[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; -
Teleport location using a secondary script [No Marker]
Fumbles88 replied to Fumbles88's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 :)! -
Teleport location using a secondary script [No Marker]
Fumbles88 replied to Fumbles88's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry guys, still have not been able to test due to dedi server issues - will keep everyone posted. -
Teleport location using a secondary script [No Marker]
Fumbles88 replied to Fumbles88's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
Teleport location using a secondary script [No Marker]
Fumbles88 replied to Fumbles88's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Didn't work I'm afraid :( Clicked set location without any issue however when we then clicked 'teleport' nothing happened - any ideas? -
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; };
-
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.
-
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.
-
Urgent - addAction Teleport Script help
Fumbles88 replied to Fumbles88's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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"; -
Urgent - addAction Teleport Script help
Fumbles88 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
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.
-
Dynamic Spawn help
Fumbles88 replied to Fumbles88's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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"; -
Dynamic Spawn help
Fumbles88 replied to Fumbles88's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
Visitor 3: Background image trouble
Fumbles88 posted a topic in ARMA 2 & OA : BI TOOLS - TROUBLESHOOTING
Hi Guys, New to Visitor 3 and have been following ZeroG's map making tutorial. Everything is going fine, I have imported my .XYZ file into visitor 3 and downloaded my images using 'Universal Map Downloader'. However I seem to have hit a problem. I am trying to put my background image over the top of the map so I can get on with Mask placement etc. When I load up my background image, however, all I am getting is a lot of white cross hatching across the screen. I have ensured that 'background images' are set to display and I have also played around with various pixel resolutions for the background image as well as various placements of the file within my arma work and p: directory. This has had me pulling my hair out for a few days now and I would appreciate it if someone could help me to get it to display. I have googled and searched the different forums available and have only found a few threads discussing this problem however none of them have allowed me to get it working Cheers for your time guys. -
Visitor 3: Background image trouble
Fumbles88 replied to Fumbles88's topic in ARMA 2 & OA : BI TOOLS - TROUBLESHOOTING
UPDATE: I have no idea how but it's now working. I had to resize the image 3 times... Must have just been something glitchy in my photoshop or visitor... All I can say for anyone else who is having the same problem is just keep making sure and resizing the image to that of the visitor 3 island until it works. -
Vehicle spawn script with waypoint
Fumbles88 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi, I know there are plenty of scripts out there and similar scripts that will allow you to spawn a vehicle of your choice and have it travel to a way point. However, I'm really trying to learn how to script off my own back, mostly as I really enjoy the satisfaction of being able to write my own scripts. At the moment I'm trying to get a script that will allow me to spawn a user defined amount of vehicles/aircraft and have them move to a defined way point. I'm using the BIS spawn function for the vehicle and have the function module on my map alongside various other units of both sides. I have put the code in 'squint' and it didn't return any problems however the vehicles in question aren't spawning. If someone could tell me what is causing them not to spawn and point out where I am going wrong I would be most grateful. // nul = [classvehicle, flyheight, waypoint, groupname, amount] execVM "scripts\herc.sqf" waitUntil {not(isNil "BIS_fnc_init")}; _veh = this select 0; _height = this select 1; _wp = this select 2; _group = this select 3; _amount = this select 4; _group = createGroup WEST; private ["_i","_marker","_vehspawn","_spawnedveh","_crew"]; _i = 0; //while code to produce vehicles while _i is less than the 'amount of vehicles desired' by user while {_i < _amount} do { _marker = createMarker ["Marker1", getMarkerPos "start"]; _vehspawn = [getMarkerPos "Marker1",005,_veh,_group] call BIS_fnc_spawnVehicle; _spawnedveh = _vehspawn select 0; _spawnedveh setpos [(getpos _spawnedveh select 0),(getpos _spawnedveh select 1),(getpos _spawnedveh select 2)+_height]; _spawnedveh flyInHeight _height; _crew = _vehspawn select 1; _crew doMove (getMarkerPos _wp); deleteMarker _marker; _i = _i+1; sleep 4; hint "Active"; sleep 2; hint ""; } -
Vehicle spawn script with waypoint
Fumbles88 replied to Fumbles88's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have kind of managed to solve it. In case anyone else wants the answer this is what I now have and will continue to work on this some more to randomize and create markers for the spawn. // null= ["C130J_US_EP1","start",005,170,"exit",WEST,10] execvm "spawn1.sqf"; waitUntil {not(isNil "BIS_fnc_init")}; _unit = _this select 0; _start = _this select 1; _dir = _this select 2; _height = _this select 3; _exit = _this select 4; _side = _this select 5; _amount = _this select 6; private ["_i","_veh","_spawnedveh","_crew"]; _i = 0; while {_i != _amount} do { _veh = [getMarkerPos _start,_dir,_unit,_side] call BIS_fnc_spawnVehicle; _spawnedveh = _veh select 0; _spawnedveh setPos [(getPos _spawnedveh select 0),(getPos _spawnedveh select 1),(getPos _spawnedveh select 2)+_height]; _spawnedveh flyInHeight 170; _crew = _veh select 1; _crew doMove (getMarkerPos _exit); _i = _i+1; sleep 4; hint "Active"; sleep 2; hint ""; }; -
That got it working, brilliant! Thanks for your help!
-
Hey guys, trying to get a script together that will force some zu_23 to fire in the air at 'invisable' targets. I have found several old scripts - the most successful one being http://forums.bistudio.com/showthread.php?78895-Making-a-ZU-23-fire-at-the-sky this is the script I'm currently using which is called using [aagun2, h2, 250, 1000] exec "scripts\flak.sqs" ; **************************************************************** ; Script file for Armed Assault ; Updated for Arma 2 Zu-23 by Recoilless ; Created by: SUPR3ME KILL3R ; Thanks to Arma Edit ; **************************************************************** _K = _this select 0 _Target = _this select 1 _radius = _this select 2 _altitude = _this select 3 #Flakloop _a= getpos _Target select 0 _b= getpos _Target select 1 _c= getpos _Target select 2 _gap=random _radius _direction=random 360 _x = _a +((cos _direction)*_gap) _y = _b +((sin _direction)*_gap) _z = _c + _altitude - _radius + random (_radius*2) _gap2=random _radius _direction2=random 360 _xx = _a +((cos _direction2)*_gap2) _yy = _b +((sin _direction2)*_gap2) _zz =_c + _altitude - _radius + random (_radius*2) _gap3=random _radius _direction3=random 360 _xxx = _a +((cos _direction3)*_gap3) _yyy = _b +((sin _direction3)*_gap3) _zzz = _c + _altitude - _radius + random (_radius*2) _gap4=random _radius _direction4=random 360 _xxxx = _a +((cos _direction4)*_gap4) _yyyy = _b +((sin _direction4)*_gap4) _zzzz = _c + _altitude - _radius + random (_radius*2) _K disableAI "Target" _K disableAI "AutoTarget" _K doWatch [_x,_y,_z] ~0.5 _K setVehicleAmmo 1 _K fire (weapons _K select 0) _K doWatch [_xx,_yy,_zz] ~0.5 _K fire (weapons _K select 0) _K doWatch [_xxx,_yyy,_zzz] ~0.5 _K fire (weapons _K select 0) _K doWatch [_xxxx,_yyyy,_zzzz] ~2 goto "Flakloop" exit however none of them seem to work and result in 'cannot find script' errors in game. The closest I've got is making them fire directly in the air. Any help would be greatly appreciated, tried doing a forum search but I couldn't find anything that I hadn't already tried.
-
Hi Guys, this script has had me tearing my hair out for the last few hours. What I'm trying to do is spawn three C-130 at the south end of Chernarus and have them fly to a waypoint in the north where they will be deleted by a trigger which will also cause the script to run again hence creating another three to fly north and be deleted and so on etc etc. However I keep getting a 'generic error' when the script runs and it says there is an "invalid number in express" on line 22 - _crew2 doMove (getMarkerPos "exit2");. If anyone could help me get this working it would be much appreciated and also tips on how to improve my scripting/coding is always welcomed! //Array - 0: created vehicle (Object), 1: all crew (Array of Objects), 2: vehicle's group (Group) private ["_herc1","_herc2","_herc3","_plane1","_plane2","_plane3","_crew1","_crew2","_crew3"]; _herc1 = [getMarkerPos "hercspawn1", 005, "C130J_US_EP1", WEST] call bis_fnc_spawnvehicle; _herc2 = [getMarkerPos "hercspawn2", 005, "C130J_US_EP1", WEST] call bis_fnc_spawnvehicle; _herc3 = [getMarkerPos "hercspawn3", 005, "C130J_US_EP1", WEST] call bis_fnc_spawnvehicle; _plane1 = _herc1 select 0; _plane2 = _herc2 select 0; _plane3 = _herc3 select 0; _plane1 flyInHeight 170; _plane2 flyInHeight 150; _plane3 flyInHeight 170; _crew1 = _herc1 select 1; _crew2 = _herc2 select 1; _crew3 = _herc3 select 1; _crew1 doMove (getMarkerPos "exit1"); _crew2 doMove (getMarkerPos "exit2"); _crew3 doMove (getMarkerPos "exit3"); hint: "spawn Active"; PS - I have the function module included in the editor
-
Fantastic, that works! Thank you very much indeed, all of you for your help! I do have one last question though, with regards to the working code. Why does waitUntil {not(isNil "BIS_fnc_init")}; make the script work?
-
Gave the code you suggested a try and still getting the exact same error. Also tried to spawn just one plane etc and yet again the same error :( this one has me scratching my head :confused:
-
Just gave it a try, unfortunately it didn't work and gave me the same errors. Thanks for the suggestion though :) much appreciated!