hogmason
Member-
Content Count
405 -
Joined
-
Last visited
-
Medals
Everything posted by hogmason
-
Conditional Scripting With Greater than less than
hogmason replied to ra1n0fpa1n's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
HERE you go tested and working _points = score _caller; if (_points > 5) then // checks for player / caller of script has 5 points { ==> YOUR CODE GOES HERE<== } else { hint "you do not have 5 Points Available to use"; }; and if you want the player to lose points for doing this then add ParaCost = { _pscore = -5; if (isServer) then { player addScore _pscore; // for hosted environment hint format ["%1 lost %2 Points for usingwhatever you want", player, _pscore]; } else { paddscore = [player, _pscore]; publicVariable "paddscore"; hint format ["%1 lost %2 Points for using whatever you want", player, _pscore]; }; so it looks like this usageCost = { _pscore = -5; if (isServer) then { player addScore _pscore; // for hosted environment hint format ["%1 lost %2 Points for usingwhatever you want", player, _pscore]; } else { paddscore = [player, _pscore]; publicVariable "paddscore"; hint format ["%1 lost %2 Points for using whatever you want", player, _pscore]; }; _points = score _caller; if (_points > 5) then // checks for player / caller of script has 5 points { ==> YOUR CODE GOES HERE<== [_caller,-5] call usageCost; } else { hint "you do not have 5 Points Available to use"; }; -
hint formating help
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
cheers mate so i got it working with _target_1 = "Supply Dump"; _target_2 = "HQ"; _enemy_3= "Eliminate all Russian Units"; _alldown = 0; while {_alldown == 0} do { if (Target1_active == 0) then {_target_1 = "";}; if (Target2_active == 0) then {_target_2 = "";}; if (Enemy_dead == 1) then {_enemy_3 = "";}; hintsilent formatText ["TARGETS REMAINING,\n %1,\n %2,\ %3", _target_1, _target_2, _enemy_3]; sleep 1; }; but it shows all targets remaining even when there is no task available yet. ---------- Post added at 10:42 ---------- Previous post was at 10:25 ---------- why is this not working [color="#FF0000"]if (Enemy_Dead == 0) then //if this equals 0 then the enemy at task site is still alive so the below hint will show remaining targets {[/color] _target_1 = "Supply Dump"; _target_2 = "HQ"; _enemy_3 = "Eliminate all Russian Units"; _alldown = 0; while {_alldown == 0} do { if (Target1_active == 0) then {_target_1 = "";}; if (Target2_active == 0) then {_target_2 = "";}; if (Enemy_dead == 1) then {_enemy_3 = "";}; hintsilent formatText ["TARGETS REMAINING,\n %1,\n %2,\ %3", _target_1, _target_2, _enemy_3]; sleep 1; }; } [color="#FF0000"]else // so if it equals 1 it means enemy are dead so the task would be compleate so thefere the below hint will show { hintsilent formatText ["No Targets Available"]; };[/color] -
hint formating help
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks guys, Blackmamb ive tried this and really like the idea its great but cant get it to work so i will just throw the details down my variables are set by for targets, on a sqf file called spawntargets.sqf [color="#FF0000"]if (isnil "Target1_active") then {Target1_active = 0}; if (isnil "Target2_active") then {Target2_active = 0};[/color] //////////////////////////////////////// target 1 ///////////////////////////////////////// [color="#FF0000"] Target1_active = 1; publicvariable "Target1_active";[/color] _distances = [100,200,300,400] call BIS_fnc_selectRandom; _target1positions = [getMarkerPos "E_Patrol", _distances, random 359, false, [0, 0]] call SHK_pos; _target1 = createVehicle ["GUE_WarfareBVehicleServicePoint", _target1positions, [], 0, "NONE"]; [color="#FF0000"]_target1 addeventhandler ["killed", { Target1_active = 0;publicvariable "Target1_active"; [sgt,nil,rgroupChat,"supply Dump has been destroyed"] call RE;}];[/color] _Target1 setVehicleInit "_Target1 addEventHandler [""HandleDamage"",{(_this select 4) == ""PipeBomb""}]" ;format ["%1 = this; this setVehicleVarName ""%1""",_target1]; processInitCommands; sleep .5; //////////////////////////////////////// target 2 ///////////// [color="#FF0000"]Target2_active = 1; publicvariable "Target2_active";[/color] _distances = [100,200,300,400] call BIS_fnc_selectRandom; _target2positions = [getMarkerPos "E_Patrol", _distances, random 359, false, [0, 0]] call SHK_pos; _target2 = createVehicle ["BTR90_HQ_unfolded", _target2positions, [], 0, "NONE"]; [color="#FF0000"]_target2 addeventhandler ["killed", { Target2_active = 0;publicvariable "Target2_active"; [sgt,nil,rgroupChat,"HQ has been destroyed"] call RE;}];[/color] _Target2 setVehicleInit "_Target2 addEventHandler [""HandleDamage"",{(_this select 4) == ""PipeBomb""}]" ;format ["%1 = this; this setVehicleVarName ""%1""",_target2]; processInitCommands; sleep .5; for enemy on a seperate sqf if (isServer) then { waituntil {!isnil "bis_fnc_init"}; [color="#FF0000"]if (isnil "Enemy_Dead") then {Enemy_Dead = 0};[/color] Enemy_Dead = 0;publicvariable "Enemy_Dead"; _dt = createTrigger ["EmptyDetector", getMarkerPos "REIN"]; _dt setTriggerArea [600, 600, 0, false]; _dt setTriggerActivation ["EAST", "NOT PRESENT", false]; [color="#FF0000"] _dt setTriggerStatements ["this","Enemy_Dead = 1; publicvariable 'Enemy_Dead';", ""]; [/color] }; and this is what i tried for the hints from you. _target1 = "Supply Dump"; _target2 = "HQ"; _enemy = "Eliminate all Russian Units"; _alldown = 0; while {_alldown == 0} do { if (Target1_active == 1) then {_target1 = "";}; if (Target2_active == 1) then {_target2 = "";}; if (Enemy_dead == 0) then {_enemy = "";}; hintsilent format ["TARGETS REMAINING,\n %1,\n %2,\ %3", _target1, _target2, _enemy]; sleep 1; }; -
Check for no enemy units via script
hogmason posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ok so i need a script that will check for no enemy east units within a 400 meter diamater of a marker say called "mkr1". ive tried a few things but i just cant get it to work. i cant use a trigger as this marker is spawned in any random location. even just a point in the right direction will be extreamly helpfull. thank you in advanced. -
I thought I would share some cool stuff.
hogmason replied to A-SUICIDAL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
hold on you telling me this will actually make the ai morters actually shoot at us players man thats choice ---------- Post added at 19:30 ---------- Previous post was at 19:22 ---------- Testing now ;) -
Check for no enemy units via script
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ok so let me get this straight i am spawning this trigger at the beginning of my task script so the trigger sits over the task area and waits for no east units to be inside it. once that is true it will change my variable to 1 then thats it the trigger is dormant never to awake ;) is that right. the reason i want to delete it is my task code is run like a loop so every time a new task is called this trigger is re-spawn using a i.e= "[] call mytrigger.sqf;" -
Check for no enemy units via script
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Awsom thanks mate huge help :) :):):):):) ---------- Post added at 15:20 ---------- Previous post was at 13:37 ---------- to delete this trigger does this work deleteTrigger _dt; -
Check for no enemy units via script
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
would this work if (isServer) then { if (isnil "Enemy_Dead") then {Enemy_Dead = 0}; _dt = createTrigger ["EmptyDetector", getMarkerPos "mrk1"]; _dt setTriggerArea [200, 200, 0, false]; _dt setTriggerActivation ["EAST", "NOT PRESENT", false]; _dt setTriggerStatements ["this",Enemy_Dead = 1; publicvariable "Enemy_Dead";, ""]; }; -
Check for no enemy units via script
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
So my idea is to set a public variable to 1 when no EAST units are found in the mk1 area so ive got this so far if (isServer) then { if (isnil "Enemy_Dead") then {Enemy_Dead = 0}; //// =====>>>CODE GOES IN HERE<<<===== //// Enemy_Dead = 1; publicvariable "Enemy_Dead"; // THIS GOES AT END OF CODE SO WHEN NO ENEMY ARE FOUND Enemy_Dead GETS SET TO 1 ---------- Post added at 12:51 ---------- Previous post was at 12:49 ---------- yeah but i dont know how to set a variable into a trigger by a script. i like the sound of waitUntil alive nearestentities/objects distance check but that most likely sounds a bit to complex for my skills ;) -
creating chopper code error
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sure mate when i get home i will post it up for you mate -
i have the below code to spawn static weapons around the map but it is not working all the time this is the code /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////// //////////////////////////////////// /////////////////////// Enemy AA Script For Operation HOG BY =Mason= ///////////////////////////////////// ////////////////////// ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// createAA ={ for "_i" from 0 to 10 do { _aamen = createGroup east; _aatype = ["Ural_ZU23_TK_GUE_EP1","Ural_ZU23_TK_EP1","ZSU_INS","2S6M_Tunguska"] call BIS_fnc_selectRandom; _aapositions = ["center", false, ["safezone"]] call SHK_pos; _aagun = createVehicle [_aatype, _aapositions, [], 0, "NONE"]; _aagun setDir random 290; _aagunner = _aamen createUnit ["RU_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"]; _aagunner assignAsGunner _aagun; _aagunner moveInGunner _aagun; {_x setSkill ["aimingAccuracy",0.65]} forEach units _aamen; {_x setSkill ["aimingShake",0.65]} forEach units _aamen; {_x setSkill ["aimingSpeed",0.65]} forEach units _aamen; {_x setSkill ["endurance",0.85]} forEach units _aamen; {_x setSkill ["spotDistance",0.99]} forEach units _aamen; {_x setSkill ["spotTime",0.85]} forEach units _aamen; {_x setSkill ["courage",0.85]} forEach units _aamen; {_x setSkill ["reloadSpeed",0.85]} forEach units _aamen; {_x setSkill ["commanding",0.85]} forEach units _aamen; {_x setSkill ["general",0.85]} forEach units _aamen; if (HOG_debug) then { [sgt,nil,rgroupChat,"Spawning Island AA Defence Debug ON."] call RE; markerfollow = { _aagun = _this select 0; _aaman = _this select 1; [sgt,nil,rgroupChat,"Creating Island AA Defence Debug Markers."] call RE; _aamarker = createMarker[str(_aaman),position _aaman]; str(_aaman) setMarkerType "mil_box"; str(_aaman) setMarkerColor "ColorRed"; str(_aaman) setMarkerText "AA"; sleep 0.2; [sgt,nil,rgroupChat,"Island AA Defence Debug Finished."] call RE; }; _handle = [_aagun,_aagunner] spawn markerfollow; }; }; }; ///////////////////////////////////////////////////////////////////////////////////////// if (isserver) then { [] spawn createAA; //sleep 50000; }; and this is my rpt log error Error in expression <, ["safezone"]] call SHK_pos; _aagun = createVehicle [_aatype, _aapositions, []> Error position: <createVehicle [_aatype, _aapositions, []> Error Type Any, expected String File C:\Users\natho\Documents\ArmA 2 Other Profiles\=Mason=\missions\task_testing.Chernarus\HOG_scripts\Enemy\Enemy_AA_Positions.sqf, line 16 cheers for the help
-
creating chopper code error
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
my bad i just checked my init.sqf and guess what i diddnt add it to it lol, gee thats 4 dumb ass mistakes in 2 days i think 9 days straight on my mission is sending me dumb ;) time for a break. -
creating chopper code error
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
so i think i fixed it by adding waituntil {!isnil "bis_fnc_init"}; to the script i diddnt think you need that again after adding it to your main init.sqf -
creating chopper code error
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah mate i got that issue in that link fixed i tried to pm u to let you know but ur inbox is full n i cant send to you. the code above is the only thing thats got me stumped mate -
thanks mate i did end up getting it to work with the following for future ref if any 1 needs it _aatype = ["Ural_ZU23_TK_GUE_EP1","Ural_ZU23_TK_EP1","ZSU_INS","2S6M_Tunguska","Igla_AA_pod_East"] call BIS_fnc_selectRandom; _aapositions = ["center",false,["safezone"]] call SHK_pos; _aagun = createVehicle [_aatype, _aapositions, [], 0, "NONE"]; _aagun setDir random 290; Also those other issues were me having a blond moment and not placing this in my main init call compile preprocessfile "SHK_pos\shk_pos_init.sqf";
-
UPSMON - Urban Patrol Script Mon
hogmason replied to Monsada's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
im creating a jet it works but its dumb even with adding SAD markers and playing with its skill so i am trying to place it in with upsmon which seems to work great however the marker that i am creating for it to spawn seems to be moved to the bottom left hand corner of the map. so the jet will only patrol the bottom left hand corner. but if i // the upsmon line of this script the marker stays in the middle of the map and the plane patrols the said waypoint. this is my code Su34DeathLoop ={ sleep 5; [] spawn Su34MapPatrol; }; Su34MapPatrol ={ _jetman = createGroup east; _Su34 = createVehicle ["Su34", getmarkerpos "center", [], 250, "FLY"]; _Su34 setDir 290; _Su34dir = 290; _Su34speed = 500; _Su34 setVelocity [(sin _Su34dir * _Su34speed),(cos _Su34dir * _Su34speed), 0]; _Su34 addEventHandler["killed", { (_this select 0) spawn Su34DeathLoop; }]; _Su34pilot = _jetman createUnit ["RU_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"]; _Su34pilot moveInDriver _Su34; _Su34pilot = driver _Su34; _Su34pilot setskill 1; [(units _Su34) select 0,"center","spawned","track","delete:",0.5] execVM "scripts\upsmon.sqf"; {_x setSkill ["aimingAccuracy",0.65]} forEach units _jetman; {_x setSkill ["aimingShake",0.65]} forEach units _jetman; {_x setSkill ["aimingSpeed",0.65]} forEach units _jetman; {_x setSkill ["endurance",0.85]} forEach units _jetman; {_x setSkill ["spotDistance",0.99]} forEach units _jetman; {_x setSkill ["spotTime",0.85]} forEach units _jetman; {_x setSkill ["courage",0.85]} forEach units _jetman; {_x setSkill ["reloadSpeed",0.85]} forEach units _jetman; {_x setSkill ["commanding",0.85]} forEach units _jetman; {_x setSkill ["general",0.85]} forEach units _jetman; //====> this code below works fine but the jet is dumb as shit =====<///// //_Su34waypoint0 = _jetman addWaypoint [getmarkerpos "center",0]; //_Su34waypoint0 setWaypointType "SAD"; //_Su34waypoint0 setWaypointBehaviour "COMBAT"; //_Su34waypoint0 setwaypointcombatmode "RED"; //_Su34waypoint0 setWaypointSpeed "NORMAL"; ////////=====> now the debug code <==//////////////////////////////////////////////////////////////////////// if (HOG_debug) then { [sgt,nil,rgroupChat,"Spawning Enemy Jet + Debug ON."] call RE; Su34markerfollow = { _Su34jet = _this select 0; _Su34jetmarker = createmarker ["jet",getMarkerPos "debug"]; _Su34jetmarker setMarkerType "mil_triangle"; _Su34jetmarker setMarkerColor "ColorRed"; _Su34jetmarker setMarkerDir (direction _Su34jet); _Su34jetmarker setMarkerText "Su34"; [sgt,nil,rgroupChat,"Spawning Enemy Jet Debug Markers."] call RE; while {alive _Su34jet} do { _Su34jetmarker setMarkerPos getPosATL _Su34jet; sleep .5; }; [sgt,nil,rgroupChat,"Spawning Enemy Jet Debug Finished."] call RE; }; _handle = [_Su34] spawn Su34markerfollow; }; }; ///////////////////////////////////////////////////////////////////////////////////////// if (isserver) then { [] spawn Su34MapPatrol; sleep 5; }; does any 1 know what i am doing wrong cheers -
Mission Capturing Command Posts
hogmason replied to ra1n0fpa1n's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You will find that if you un pbo the actuall arma files i dont know what file but as kylana said ots not as easy as grabbing there script as u will find its going to be spread out in a few files and very complex to work out whitch ones. Also if u tamper with there files it will then be a addon not a script so every one will have to download what u edit. Good luck mate hope that helps -
I thought I would share some cool stuff.
hogmason replied to A-SUICIDAL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
great stuff mate sure that will all be extreamly usefull to alot of mission designers ;) ;););););) ---------- Post added at 22:30 ---------- Previous post was at 22:29 ---------- i wonder if that commandwatch code will work on getting enemy morter positions to actually spot and fire on u seing as they never ever fire on anything -
Hi wondering how i place in a exclusion zone marker so none of my aa guns spawn inside the said marker this is my code and the marker i want as my exclusion zone is safe_zone my code _aadistance = [1000,2000,3000,4000,5000,6000] call BIS_fnc_selectRandom; _aatype = ["Ural_ZU23_TK_GUE_EP1","Ural_ZU23_TK_EP1","ZSU_INS","2S6M_Tunguska","Igla_AA_pod_East"] call BIS_fnc_selectRandom; [color="#FF0000"]//////===>thinking this _aasafespot = getMarkerPos "safe_zone"; ////====> and placing this somewere in the positions code _aasafespot[/color] _aapositions = [getMarkerPos "airpatrol", _aadistance, random 359, false, [0, 0]] call SHK_pos; _aagun = createVehicle [_aatype, _aapositions, [], 0, "NONE"]; _aagun setDir random 290; ---------- Post added at 16:15 ---------- Previous post was at 15:08 ---------- im trying to spawn a marker on the map in a random position using shk_pos but its not working Does any 1 know what i have done wrong. private ["_taskMARKERdistances","_taskMARKERnoSPAWNzone","_taskMARKERcenter","_createTASKmarker"]; if isserver then { //set up Paramaters _taskMARKERdistances = [1000,2000,3000,4000,5000,6000] call BIS_fnc_selectRandom; //_taskMARKERnoSPAWNzone = getMarkerPos "safe_zone"; _taskMARKERcenter = getMarkerPos "center"; //create task Marker _createTASKmarker = createmarker ["newtaskmarker", getMarkerPos _taskMARKERcenter, _taskMARKERdistances, random 359, false, [0, 0]] call SHK_pos; _createTASKmarker setMarkerType "mil_triangle"; _createTASKmarker setMarkerColor "ColorGreen"; sleep 0.5; //Start to spawn the Targets }; ---------- Post added at 16:56 ---------- Previous post was at 16:15 ---------- got it working with this but the marker only spawns in the bottom right hand corner of the map in the water. if isserver then { //set up Paramaters _taskMARKERdistances = [1000,2000,3000,4000,5000,6000] call BIS_fnc_selectRandom; //_taskMARKERnoSPAWNzone = getMarkerPos "safe_zone"; _taskMARKERposition = [getMarkerPos "center", _taskMARKERdistances, random 359, false, [0, 0]] call SHK_pos; //create task Marker _createTASKmarker = createmarker ["newtaskmarker", _taskMARKERposition]; _createTASKmarker setMarkerType "mil_objective"; _createTASKmarker setMarkerColor "ColorGreen"; }; dont know what is wrong this is the rpt error Error in expression < _pos select 1; _posX = _orgX + (_dst * sin _dir); _posY = _orgY + (_dst * cos _> Error position: <sin _dir); _posY = _orgY + (_dst * cos _> Error sin: Type Bool, expected Number File C:\Users\natho\Documents\ArmA 2 Other Profiles\=Mason=\missions\Operation_HOG_v2_23.Chernarus\shk_pos\shk_pos_fnc_getpos.sqf, line 10
-
spawn vehicles at random distance from marker
hogmason posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ive got this code that spawn my AA but im stuck on trying to get them to spawn around the map and not on the center of my spawn marker. Ive tried implementing in hundreds of ways something like this _aadis = [200,500,1000,2000,3000,4000,5000] call BIS_fnc_selectRandom; but i cant seem to get that to work in the code this is my code any ideas how i can get the above code to work in the following code to let the aa spawn at random distances _grp = createGroup east; _aapod = createVehicle ["Igla_AA_pod_East", getmarkerpos "center", [], 0, "NONE"]; _aapod setDir 290; _dir = 290; _aapod addEventHandler["killed", { (_this select 0) spawn AALoop; }]; _gunner = _grp createUnit ["RU_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"]; _gunner assignAsGunner _aapod; _gunner moveInGunner _aapod; ---------- Post added at 10:33 ---------- Previous post was at 10:05 ---------- i just tried this still no luck _grp = createGroup east; //_aapod = createVehicle ["Igla_AA_pod_East", getmarkerpos "center", [], 0, "NONE"]; _distances = [5,10,35,50,65,80,90] call BIS_fnc_selectRandom; _ang = random 360; _dis = _distances; _dx = sin(_ang)*_dis; _dy = cos(_ang)*_dis; _aapod = createVehicle ["Igla_AA_pod_East", [((getmarkerpos "center") select 0) + _dx, ((getmarkerpos "center") select 1) + _dy, 0], [], 0, "NONE"]; ---------- Post added at 11:40 ---------- Previous post was at 10:33 ---------- any ideas guys -
spawn vehicles at random distance from marker
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
perfect cuel thanks mate something i diddnt think off i changed it to HOG_debug now everything works great maybe a third party script i used was using debug ;) ---------- Post added at 22:20 ---------- Previous post was at 22:16 ---------- so while we are on the subject of code 1 question when u use private [_staic, _aa, _whatever, _whatever2] this just makes those names only matter on the said script yeah, so i can use those names again on another script and it want effect them. is that how it works. -
spawn and create enemy base objects via script
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
MikieBoy as always Mate you da MAN. :yay: :yay: :yay: -
spawn and create enemy base objects via script
hogmason posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ok so i know this is going to be shit hard but im going to throw it out there say if i want to spawn i.e 3 artillery guns with bunkers around them in a nice neat semi circle position and say a hq and a few sand bag walls surrouding them like a base ' how would i do that via script. I know i would spawn them on a marker and what i need on the map to spawn them i.e functions module and what not but hoiw do you code the relevant positions with the objects. -
spawn vehicles at random distance from marker
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
thanks panther i think i might be able to filter throught that to find how he sets the distance to spawn away from another object.. very helpfull mate. Now i got the code working turns out my issue was this if ([color="#FF0000"]debug[/color]) then { now that works in my other code that gets loaded from the main init but with my new code it gets loaded from inside another script and for some reason doesnt remember this from my main init.sqf debug = paramsarray select 2; so i had to change it to if(_debug) then { ///==== and place this at the top of my code _debug = true; I know this is fixed but i really need to have my new code read the debug from if (debug) then { so i can have the debug option in my params would any 1 know why this happens and how to fix the issue. -
spawn vehicles at random distance from marker
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
checked everything even retyped it all everything seems to be fine identical to the working version but this just isnt working here is the code. /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////// //////////////////////////////////// /////////////////////// Enemy static Script For Operation HOG BY =Mason= ///////////////////////////////////// ////////////////////// ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// createstatics ={ for "_i" from 0 to 10 do { _grp1 = createGroup east; _aadis1 = [1000,2000,3000,4000] call BIS_fnc_selectRandom; _pos1 = [getMarkerPos "center", _aadis1, random 359, false, [0, 0]] call SHK_pos; _aapod1 = createVehicle ["Igla_AA_pod_East", _pos1, [], 0, "NONE"]; _aapod1 setDir random 290; //_aapod1 addEventHandler["killed", { (_this select 0) spawn AALoop; }]; _gunner1 = _grp1 createUnit ["RU_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"]; _gunner1 assignAsGunner _aapod1; _gunner1 moveInGunner _aapod1; {_x setSkill ["aimingAccuracy",0.65]} forEach units _grp1; {_x setSkill ["aimingShake",0.65]} forEach units _grp1; {_x setSkill ["aimingSpeed",0.65]} forEach units _grp1; {_x setSkill ["endurance",0.85]} forEach units _grp1; {_x setSkill ["spotDistance",0.99]} forEach units _grp1; {_x setSkill ["spotTime",0.85]} forEach units _grp1; {_x setSkill ["courage",0.85]} forEach units _grp1; {_x setSkill ["reloadSpeed",0.85]} forEach units _grp1; {_x setSkill ["commanding",0.85]} forEach units _grp1; {_x setSkill ["general",0.85]} forEach units _grp1; if (debug) then { [sgt,nil,rgroupChat,"Spawning Island AA Defence Debug ON."] call RE; markerfollow1 = { _aagun1 = _this select 0; _aaman1 = _this select 1; hint format["%1",_aaman1]; [sgt,nil,rgroupChat,"Creating Island AA Defence Debug Markers."] call RE; _m1 = createMarker[str(_aaman1),position _aaman1]; str(_aaman1) setMarkerType "Dot"; sleep 0.2; [sgt,nil,rgroupChat,"Island AA Defence Debug Finished."] call RE; }; _handle1 = [_aapod1,_gunner1] spawn markerfollow1; }; }; }; ///////////////////////////////////////////////////////////////////////////////////////// if (isserver) then { hint "spawning statics"; [] spawn createstatics; //sleep 50000; };