hogmason
Member-
Content Count
405 -
Joined
-
Last visited
-
Medals
Everything posted by hogmason
-
Random Mission (which not been completed)
hogmason replied to Sc0rc3d's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
this will fill all the choppers cargo seats and spawn a pilot and main gunner waituntil {!isnil "bis_fnc_init"}; hint "Spawn Random Helicopter after 60 Seconds!"; sleep 60; private ["_enemyArmPool","_ArmNumberSpawn","_ArmType","_spawnedArmUnit","_patrolmark","_spawnmark","_ArmUnit","_b","_armored"]; _patrolmark = _this select 0; _spawnmark = _this select 1; _armored = _this select 2; [color="#FF0000"][/color][color="#FF0000"]_pilotman = createGroup east;[/color] // create a group _b = 0; while {_b != _armored} do { _enemyArmPool = ["ACE_Ka50","Mi17_TK_EP1","Mi17_rockets_RU","Mi24_D_TK_EP1"] call BIS_fnc_selectRandom; _spawnedArmUnit = [getMarkerPos _spawnmark, 180, _enemyArmPool, EAST] call bis_fnc_spawnvehicle; _ArmUnit = _spawnedArmUnit select 0; _ArmUnit setPosATL [getPosATL _ArmUnit select 0, getPosATL _ArmUnit select 1, 300]; {_x setVehicleInit "nul = [this, _patrolmark] execVM 'ups.sqf';";} forEach units _ArmUnit; processInitCommands; // add the pilot if you need him [color="#FF0000"] _pilot = _pilotman createUnit ["RU_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"]; _pilot moveInDriver _ArmUnit; _pilot1 = driver _ArmUnit; _pilot setskill 1; // add gunner if you need to _gunner = _pilotman createUnit ["RU_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"]; _gunner moveInGunner _ArmUnit; _gunner = Gunner _ArmUnit; _gunner setCombatMode "RED"; _gunner setskill 1; // fill all seats of the chopper with enemy if you need them _cargoNum = _ArmUnit emptyPositions "cargo"; if (_cargoNum > 0) then { _fillSlots = round (random _cargoNum); _pos = getMarkerPos _spawnmark; _locGr = _pos findEmptyPosition [10, 100]; sleep .2; if (_locGr select 0 > 0)then { _cargo = [_locGr, East, _cargoNum,[],[],[],[],[_fillSlots,0.5]] call BIS_fnc_spawnGroup; sleep .2; {_x moveInCargo _ArmUnit;} forEach units _cargo; }; };[/color] sleep 600; // wait for 10 Minutes and spawn one more _b = _b+1; }; sleep 5; hint "Its Done..."; ---------- Post added at 23:59 ---------- Previous post was at 23:38 ---------- you could give your chopper some direction and speed to start him off faster in a patrol by replacing spawnedArmUnit = [getMarkerPos _spawnmark, 180, _enemyArmPool, EAST] call bis_fnc_spawnvehicle; with _spawnedArmUnit = createVehicle [_enemyArmPool, getmarkerpos _spawnmark, [], 500, "FLY"]; //500 is the height _spawnedArmUnit setCombatMode "RED"; _spawnedArmUnit setDir 290; _hinddir = random 290; _hindspeed = 100; _spawnedArmUnit setVelocity [(sin _hinddir * _hindspeed),(cos _hinddir * _hindspeed), 0]; just an idea -
Marker Text Using a var name i think its called lol
hogmason posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
so i need to set the text of my dynamic markers as a distance from an object this is what i use and have tried, p.s- my marker work fine _locations = ["c1","c2","c3","c4","c5"] call BIS_fnc_selectRandom; _selection = _locations; _dist = random 500; [color="#FF0000"]_distance = _dist;[/color] _dir = random 360; _pos = [((getMarkerPos _selection) select 0) + (sin _dir) * _dist, ((getMarkerPos _selection) select 1) + (cos _dir) * _dist, 0]; //_pos = ["AO",false,["safe_zone"]] call SHK_pos; _intellmarker = createMarkerLocal [format ["mrk%1",random 100000], _pos]; _intellmarker setMarkerTypeLocal "hd_unknown"; _intellmarker setMarkerColorLocal "ColorRed"; [color="#FF0000"]_intellmarker setMarkerTextLocal _distance[/color]; any help would be great as im stuck this is my rpt error Error setmarkertextlocal: Type Number, expected String File C:\Users\natho\Documents\ArmA 2 Other Profiles\=Mason=\missions\OP_HOG_Sangin_Uprising.hellskitchen\HOG_scripts\HOG_intell\intell_init.sqf, -
clear marker array & marker text via variable
hogmason posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
hi guys i have done a little script to create random false intell markers on a map all works fine but i need to delete the intell markers once it reaches a set amount so i dont crowed the map to do this i have used _limit = count Intell_Marker_Array; if (_limit > 3) then { {deleteMarker _x} forEach Intell_Marker_Array; }; which works fine but it does not clear the markers in the array only on the map so every time a new marker is created the code still thinks there are over 3 markers so it deletes them again. so i guess i need to know how to clear an array this is how i do my array Intell_Marker_Array = []; // to add a marker i use this after i create the marker Intell_Marker_Array set[(count Intell_Marker_Array), _intellmarker]; //////////////////////////////////////////////////////////////////////////////////////// Also how can i add txt to the marker that is a distance to an object this is what i tried but does not work [color="#FF0000"]_distance = random 1500;[/color] [color="#FF0000"]_intellmarker setMarkerTextLocal [_distance];[/color] -
Random Mission (which not been completed)
hogmason replied to Sc0rc3d's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
http://ds5758.hostname.net.au/downloads/=HARDCORE=%20Downloads/ARMADownloads/masons%20editing/_randomTasks.utes.rar there you go mate try that one ;) -
clear marker array & marker text via variable
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
lmao the only thing i diddnt think off cheers mate ill try that -
Random Mission (which not been completed)
hogmason replied to Sc0rc3d's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
send me a demo mate ill have a play around ;) -
Random Mission (which not been completed)
hogmason replied to Sc0rc3d's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ok so from what i can see you are not calling the fn_spawntown1Mission. ill take a closer look today for you and post it up here ---------- Post added at 08:41 ---------- Previous post was at 08:21 ---------- forget my last lol i diddnt see at the bottom you do call it ;) as for the no markers and what not you need to let taskmaster create the marker for all players to see so replace ["Cainna_Wind","Sichern sie die Stadt Cainna Wind!","Sichern sie die Stadt",true,[]] call SHK_Taskmaster_add; for ["Cainna_Wind","Sichern sie die Stadt Cainna Wind!","Sichern sie die Stadt",true,["taskarea",getmarkerpos "Sichern sie die Stadt!","flag","ColorRed"]] call SHK_Taskmaster_add; ill explain this line here you create the marker for the task area _marker = createMarker ["Sichern sie die Stadt!",[2612.26,1845.69,0]]; in singleplayer this works fine but on a dedi this marker is only created on the machine running the code as it is not local so in your case the createMarker works fine to create a place holder then you need to create a local marker for all players to see so you will use Taskmaster to do this for you with ease. For future ref createMarker = creates a marker on the machine running the code only visible to said machine createMarkerLocal = creates the marker on all machines / all players. as far as ending the task when the east unit is dead this is another way dont worry bout your public varables in this case i cant see you need them but you did do it abit wrong from what i know any way should look like this //top of script if (isnil "Cainna_done") then {Cainna_done = 0;}; camp_active = 1; publicvariable "camp_active"; //then you code //and then tied into something youd use this Cainna_done = 0; publicvariable "Cainna_done"; i.e _HQbunker addeventhandler ["killed", { Cainna = 0; publicvariable "Cainna_done";[sgt,nil,rgroupChat,"Enemy camp has been destroyed"] call RE;}]; //then your waituntill waitUntil {FOB_Secure == 1}; any way this works _missionType = _this select 0; sleep random 5; fn_spawntown1Mission = { _marker = createMarker ["Sichern sie die Stadt!",[2612.26,1845.69,0]]; _marker setMarkerType "mil_destroy"; _marker setMarkerColor "ColorRed"; _marker setMarkerText "Sichern sie die Stadt!"; _marker setMarkerSize [1,1]; ["Cainna_Wind","Sichern sie die Stadt Cainna Wind!","Sichern sie die Stadt",true,["taskarea",getmarkerpos "Sichern sie die Stadt!","flag","ColorRed"]] call SHK_Taskmaster_add; player sideChat "Neue Mission: Sichern sie die Stadt Cainna Wind."; waitUntil{!alive Cainna_guy }; deleteMarker _marker; [player,nil,rSIDECHAT,"Gut gemacht, die Stadt Cainna Wind ist nun Sicher!"] call RE; // ["Cainna_Wind","succeeded"] call SHK_Taskmaster_upd; ["Cainna_Wind","succeeded"] call SHK_Taskmaster_isCompleted; sleep 3; hint ""; sign = sign1 addAction [ ("<t color=""#D7DF01"">" + ("Zufalls Mission") + "</t>"), "missionfinder.sqf" ]; }; _missionDetails = switch (_missionType) do { case "town1": {call fn_spawntown1Mission;}; }; -
respawning a dynamic ai group using randomgroup
hogmason posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ok so i need to set up a respawn of a group once all are killed. this is easy to do for a unit but i dont know how for a random group. this is what i have got patrols init.sqf waituntil {!isnil "bis_fnc_init"}; if isserver then { sleep 10; for "_i" from 0 to 100 do { //hint "spawning patrol"; _SPAWNPOS = ["AO",false,["safe_zone"]] call SHK_pos; _types = ["Infantry"] call BIS_fnc_selectrandom; _patrol = [_SPAWNPOS, _types, 1000,"BIS_TK_INS"] execVM "HOG_scripts\HOG_patrols\crB_taskPatrol.sqf"; [color="#FF0000"]// this is the group [/color] //_patrol addeventhandler ["killed", {null = this execVM 'HOG_scripts\HOG_patrols\respawn.sqf';}]; /////// [color="#FF0000"]i tried this but it doesnt work[/color] sleep 1; }; }; crB_taskPatrol.sqf if(!isServer) exitWith{}; private["_pos","_type","_dist","_fac","_grp","_code"]; _pos = _this select 0; _type = _this select 1; _dist = _this select 2; _fac = nil; if(count _this > 3) then { _fac = _this select 3; }; _code = ""; if(count _this > 4) then { _code = _this select 4; }; _grp = [_pos, _type, _fac] call compile preprocessFileLineNumbers "HOG_scripts\HOG_patrols\crB_randomGroup.sqf"; call compile _code; sleep 5; call{[_grp, position leader _grp, _dist] execVM "HOG_scripts\HOG_patrols\BIN_taskPatrol.sqf";}; crB_randomGroup.sqf if(!isServer) exitWith{}; private["_pos","_type","_fac","_facs","_sidex","_side","_grpx","_grps","_grp","_radius"]; _pos = _this select 0; _type = _this select 1; _fac = nil; // setup default param if (count _this > 2) then { _fac = _this select 2; }; if (isNil "_fac") then { _fac = east; }; //hint str _fac; // init BIS funcs and ACE waitUntil {!isNil "bis_fnc_init"}; _facs = []; _side = nil; // get all factions _allfacs = [] call BIS_fnc_getFactions; // if default or selection by side if(typeName _fac == "ANY" || typeName _fac == "SIDE") then { if(typeName _fac == "SIDE") then { _side = _fac; _fac = nil; }; switch(_side) do { case east: { _sidex = 0; }; case west: { _sidex = 1; }; case resistance: { _sidex = 2; }; case civilian: { _sidex = 3; }; }; { _fx = getNumber(configFile >> "CfgFactionClasses" >> _x >> "side"); if (_fx == _sidex) then { _facs = _facs + [_x]; }; } forEach _allfacs; }; //hint str _facs; // if single faction if(typeName _fac == "STRING") then { _facs = [_fac]; _fac = nil; }; // if multiple factions if(typeName _fac == "ARRAY") then { _facs = _fac; _fac = nil; }; if(isNil "_fac" && !isNil "_side") then { _s = switch(_side) do { case resistance: {"Guerrila";}; case civilian: {"Civilian";}; default {str _side;}; }; //hint str _s; _facx = []; { _grpx = count(configFile >> "CfgGroups" >> _s >> _x >> _type); for "_y" from 1 to _grpx - 1 do { if (!(_x in _facx)) then { _facx = _facx + [_x]; }; }; } forEach _facs; _facs = _facx; }; //hint str _facs; // pick random faction and validate _fac = _facs select floor(random count _facs); //if(!(_fac in _allfacs)) exitWith{player GlobalChat format["crB_randomGroup - ""%1"" not valid - %2", _fac, _allfacs];}; if(isNil "_side") then { _sidex = getNumber(configFile >> "CfgFactionClasses" >> _fac >> "side"); _side = nil; switch(_sidex) do { case 0: { _side = east; }; case 1: { _side = west; }; case 2: { _side = resistance; }; case 3: { _side = civilian; }; }; }; //player globalChat format["Side %1 %2 Fctns: %3 This %4 Type %5", _side, _sidex, _facs, _fac, _type]; _grps = []; _s = switch(_side) do { case resistance: {"Guerrila";}; case civilian: {"Civilian";}; default {str _side;}; }; //hint str _s; _grpx = count(configFile >> "CfgGroups" >> _s >> _fac >> _type); for "_y" from 0 to _grpx - 1 do { _grps = _grps + [(configFile >> "CfgGroups" >> _s >> _fac >> _type) select _y]; }; //hint str _grps; _grp = _grps select floor(random count _grps); //hint format["%1 %2 %3", _pos, _side, _grp]; _spawnGrp = [_pos, _side, _grp] call BIS_fnc_spawnGroup; if(_side == civilian) then { [_spawnGrp, _pos] spawn { _spawnGrp = _this select 0; _pos = _this select 1; while{true} do { _wp = _spawnGrp addWaypoint [_pos, 0]; _wp setWaypointType "DISMISS"; _wp setWaypointBehaviour "SAFE"; sleep 300; }; }; }; //player globalChat format["type: %1 fac: %2", _type, _fac]; _spawnGrp; BIN_taskPatrol.sqf _grp = _this select 0; _pos = _this select 1; _max_dist = _this select 2; _debug = if ((count _this) > 3) then {_this select 3} else {0}; _blacklist = if ((count _this) > 4) then {_blacklist = _this select 4} else {[]}; _mode = ["YELLOW", "RED", "GREEN"] call BIS_fnc_selectRandom; _formation = ["LINE"] call BIS_fnc_selectRandom; _grp setBehaviour "SAFE"; _grp setSpeedMode "NORMAL"; _grp setCombatMode _mode; _grp setFormation _formation; _center_x = (_pos) select 0; _center_y = (_pos) select 1; _center_z = (_pos) select 2; if(isNil "_center_z")then{_center_z = 0;}; _wp_count = 4 + (floor random 3) + (floor (_max_dist / 100 )); _angle = (360 / (_wp_count -1)); _new_angle = 0; _wp_array = []; _slack = _max_dist / 5.5; if ( _slack < 20 ) then { _slack = 20 }; _angle_offset = random 360; while {count _wp_array < _wp_count} do { private ["_x1","_y1","_wp_pos", "_prepos","_bldgpos","_bldgs"]; _newangle = (count _wp_array * _angle) + _angle_offset; _x1 = _center_x - (sin _newangle * _max_dist); _y1 = _center_y - (cos _newangle * _max_dist); _prepos = [_x1, _y1, _center_z]; if ( isNil "_center_z" ) then { _prepos = [_x1, _y1]; }; _wp_pos = [_prepos, 0, _slack, 6, 0, 50 * (pi / 180), 0, _blacklist] call BIS_fnc_findSafePos; if (leader _grp isKindOf "Man") then { ////////////////////////////////////////////////////////////////// // The following code is an extract from Random Building Position Script v1.0 by Tophe of Östgöta Ops ////////////////////////////////////////////////////////////////// _bldgpos = []; _bldgs = nearestObjects [_wp_pos, ["Building"], 50]; { private["_i","_y"]; _i = 0; _y = _x buildingPos _i; while {format["%1", _y] != "[0,0,0]"} do { _bldgpos = _bldgpos + [_y]; _i = _i + 1; _y = _x buildingPos _i; }; } forEach _bldgs; if(count _bldgpos != 0) then {_wp_pos = _bldgpos call BIS_fnc_selectRandom;}; _wp_array = _wp_array + [_wp_pos]; sleep 0.5; }; }; sleep 1; for "_i" from 1 to (_wp_count - 1) do { private ["_wp","_cur_pos","_marker","_marker_name"]; _cur_pos = (_wp_array select _i); // Create waypoints based on array of positions _wp = _grp addWaypoint [_cur_pos, 0]; _wp setWaypointType "MOVE"; _wp setWaypointCompletionRadius (5 + _slack); [_grp,_i] setWaypointTimeout [0, 2, 16]; // When completing waypoint have 33% chance to choose a random next wp [_grp,_i] setWaypointStatements ["true", "if ((random 3) > 2) then { group this setCurrentWaypoint [(group this), (floor (random (count (waypoints (group this)))))];};"]; if (_debug > 0) then { _marker_name = str(_wp_array select _i); _marker = createMarker[_marker_name,[_cur_pos select 0,_cur_pos select 1]]; _marker setMarkerShape "ICON"; _marker_name setMarkerType "DOT"; }; sleep 0.5; }; // End back near start point and then pick a new random point _wp1 = _grp addWaypoint [_pos, 0]; _wp1 setWaypointType "SAD"; _wp1 setwaypointCombatMode "GREEN"; _wp1 setWaypointBehaviour "SAFE"; _wp1 setWaypointCompletionRadius (random (_max_dist)); [_grp,(count waypoints _grp)] setWaypointStatements ["true", "group this setCurrentWaypoint [(group this), (round (random 2) + 1)];"]; // Cycle in case we reach the end _wp2 = _grp addWaypoint [_pos, 0]; _wp2 setWaypointType "CYCLE"; _wp2 setWaypointCompletionRadius 100; true -
Random Mission (which not been completed)
hogmason replied to Sc0rc3d's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ok im no expert but have been learning alot about random missions and mp missions, so here are a few pointers, 1) the task markers. players who start the game at the beginning will see all these markers BUT Players who join later (JIP) will not so to work around that you make a marker array and update them on player connect i.e in your main init have markerArray = ["mkr","mkr","mkr","mkr"]; // replace the mkr for your marker names. onPlayerConnected "{_x setMarkerPos (getMarkerPos _x)} forEach markerArray"; 2) Updating tasks and task stat to JIP players Arma will not update all this by itself so you need some code to update the task state. easist way to do this is use shk_taskmaster chat more about this next. 3) dynamic tasks, this is how i would do the tasks like you want them. you will need to download taskmaster. below i have a demo of a defend task called from a init line on a sign, in your init have call compile preprocessfile "shk_taskmaster.sqf"; then a sign on the map like you want in the init of the sign have this addAction ["Defend mission", "defend_init.sqf"]; defend_init.sqf nul = [] execVM "defend_start.sqf"; // start the defend task code sleep 10; // some time for it to all spawn ["yourtaskname","yourtaskname","yourtask details",true,[]] call SHK_Taskmaster_add; // add the task to players task list this updates for JIP players aswell using taskmaster player sideChat "New Mission Updated.";//hint to all players to let them know task is ready now defend_start.sqf you will place your tasks script in here and use it to spawn all enemy and targets and clean up the task and end the task. all the stuff goes in here now to end the task you do something like this [sgt,nil,rgroupChat,"Task compleated well done!"] call RE; // change sgt to the name of your teamleader deleteMarker "yourmarker"; deleteMarker "yourmarker"; deleteMarker "yourmarker"; ["yourtaskname","compleate"] call SHK_Taskmaster_upd; i hope this helps and is not to much dribble pretty late here and im half asleep ;) GOOD LUCK -
script "blah.sqf" not found but it is
hogmason posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ok so i placed my mission on to a dedi and nothing it keeps reading fromk bank. Then i whent back to the editor and notice when i play the game as a test in the editor all works fine, no errors and nothing in my rpt log. All scripts are working no errors. But when i exit the editor i get a error script ammo\ammo.sqf not found wierd as when testing it its function works fine. so i decided to for testing delete that script and all callings of it then i play and test works great but when i exit editor same thing script blah blah.sqf not found only this time its a different script so i keep going and deleting all these scripts but every time i exit the editor i get a script not found error. Has any 1 got any ideas i have gone over every script i9 have and made sure all paths are correct its got me stuffed and pissed off as i have spent about 5 months on this mission :( -
script "blah.sqf" not found but it is
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yeah cheers guys but that is not the issue i use notepad ++ and make sure i always save as sqf Also all scripts i am using work fine in other missions as i just have a template i merge over to new missions the only thing i ever change now is the target thought i cracked it down to a map hellskitchen as i merged my mission files over to fallujah and all worked and no errors when i leave the editor BUT when i tried it on a dedi the mission still did not load :( -
script "blah.sqf" not found but it is
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Rgr will do mate im just half way throught reinstalling arma to try rule out poor installed mod ---------- Post added at 14:43 ---------- Previous post was at 14:18 ---------- righto so changed that the cachihng still works cheers mate. now i have reinstalled arma and cba and still when i place a unit on the map or anything with a execVM command in its init i get the missing sqf warning when i leave the editor. its got me baffled. -
script "blah.sqf" not found but it is
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Server is a gamelogic the whole thing is part of norrins revive demo and the other part is cb unit cach the 500 is the area of spawn cached units thats just what the scripters instructions are -
script "blah.sqf" not found but it is
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
funny enought flag i just worked out that my issue is only comming from scripts that are called from init lines of anything on the map wierd hey cheers for the reply mate now just got to work out why innit line ececVM's are cousing errors. ---------- Post added at 11:50 ---------- Previous post was at 11:49 ---------- yeah so exactly the same issue mate but i use a intro camera not an outro camera i wonder !!!!!!!!!!!!!!!!!! ---------- Post added at 11:54 ---------- Previous post was at 11:50 ---------- ok so when i place my init lines in to a trigger instead of the vehicles / units i still get the same errors ---------- Post added at 11:56 ---------- Previous post was at 11:54 ---------- for shits and giggles ill place my main init.sqf in here as im thinking maybe there might be an error in the main init like ordering or something dont know ill let a pro have a look ;) if ((!isServer) && (player != player)) then { waitUntil {player == player}; waitUntil {time > 10}; }; enableSaving [false, false]; waituntil {!isnil "bis_fnc_init"}; //paramaters if(isNil "paramsArray") then{ paramsArray = [8, 1000, 1]; }; skiptime (((paramsArray select 0) - daytime + 24) % 24); if((paramsArray select 2) == 1) then {Hog_Debug = true;}; //intro playSound "start"; to_preload = false; to_onpreload = true; onPreloadFinished "if (to_onpreload) then {to_preload = true; [player] exec ""HOG_scripts\HOG_intro\camStart.sqs""}"; ASfirstrun = true; HOGDEBUG = compile (preprocessFileLineNumbers "HOG_scripts\HOG_debug\HOGdebug.sqf"); ied_detonate = compile (preprocessFileLineNumbers "HOG_scripts\HOG_ieds\ied_detonate.sqf"); call compile preprocessfile "SHK_pos\shk_pos_init.sqf"; server execVM "revive_init.sqf"; execVM "HardcoreMisc\briefing.sqf"; execVM "HOG_scripts\HOG_markers\fnc_Markers.sqf"; [] execVM "HOG_scripts\player settings\init.sqf"; [player] execVM "HOG_scripts\HOG_mechanic\vehiclerepair.sqf"; [500] call compile preprocessFileLineNumbers "modules\CEP_caching\main.sqf"; [] execVM "f\common\ShackTac_setlocalFTMemberMarkers.sqf"; execVM "HOG_scripts\HOG_patrols\HOG_patrols_init.sqf"; execVM "HOG_scripts\HOG_camps\start.sqf"; execVM "HOG_scripts\HOG_ieds\HOG_IED_Init.sqf"; HOG_markerArray = ["camp1","camp2","camp3","camp4","camp5"]; onPlayerConnected "{_x setMarkerPos (getMarkerPos _x)} forEach HOG_markerArray"; "AO" setMarkerAlpha 0; "safe_zone" setMarkerAlpha 0; ---------- Post added at 12:53 ---------- Previous post was at 11:56 ---------- ok so i have narrowed it down to only a execVM command that calls a script from inside a init line of anything on the editor cuases this issue so in game when you play it it works fine but when you exit the editor you get the error script not found error. now thats tested by new mission 1 unit on map 1 trigger on map inside trigger i have null = execVM "Air_Support_activate.sqf"; thats it also the Air_Support_activate.sqf is inside my folder now the only mod im using is CBA. any ideas ---------- Post added at 12:55 ---------- Previous post was at 12:53 ---------- this is my rpt log [35354,1230.84,0,"XEH: PostInit Started"] [35354,1230.88,0,"CBA_VERSIONING: cba=1.0.0.187, cba_a2=1.0.0.8, cba_oa=1.0.0.6, "] [35354,1230.89,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=false, _playerCheckDone=true, _sp=true, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=1, _sessionId=6, _level=0, _timeOut=false, _game=1, BIS_functions=L 1-1-A:1, group=L 1-1-A, player=sgt, _playerType="USMC_Soldier", _playerGroup=B 1-1-A"] [35637,1239.05,0,"XEH: PreInit Started. v1.0.0.187. MISSINIT: missionName=Intro1, worldName=hellskitchen, isMultiplayer=false, isServer=true, isDedicated=false"] [35637,1239.18,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_disable_cache.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"] [35639,1239.78,0,"XEH: PostInit Started"] [35639,1239.83,0,"CBA_VERSIONING: cba=1.0.0.187, cba_a2=1.0.0.8, cba_oa=1.0.0.6, "] [35639,1239.83,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=false, _playerCheckDone=true, _sp=true, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=1, _sessionId=7, _level=0, _timeOut=false, _game=1, BIS_functions=L 1-1-A:1, group=L 1-1-A, player=<NULL-object>, _playerType="", _playerGroup=<NULL-group>"] Warning Message: Script Air_Support_activate.sqf not found -
check player array distance code producing errors
hogmason posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
i am getting a heap of strange errors with this code can some one have a look at it for me the code waituntil {!isnil "bis_fnc_init"}; _iedpos = _this select 0; _targetarray = [sgt,Medic2,Medic,Sniper,Machinegunner,Morter,Scout,FAC,AssualtTrooper,AssualtTrooper_1,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11];// removed ied tech while {true} do { hint "ur dead"; _wait = [0.5,1,2,3] call BIS_fnc_selectRandom; _distance = [5,10] call BIS_fnc_selectRandom; if ({(_x distance _iedpos) <_distance} count _targetarray) exitWith { hint "FUCK IED RUN";// CHANGE TO PLAY A SOUND sleep _wait; _bombtype = ["Bo_Mk82","BO_GBU12_LGB"] call BIS_fnc_selectRandom; _bomb = _bombtype createVehicle position _iedpos; deletevehicle _iedpos; execVM "HOG_scripts\HOG_ieds\respawn.sqf"; }; sleep 5; }; errors like Error in expression <t = [1,2,3] call BIS_fnc_selectRandom; if ({(_x distance _iedpos) <10} count _t> Error position: <if ({(_x distance _iedpos) <10} count _t> Error if: Type Number, expected Bool -
check player array distance code producing errors
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yeah what can i say im an extreamist lmaorofl ---------- Post added at 09:25 ---------- Previous post was at 09:24 ---------- wait till you play the mission lmao its extream rambos will not last -
check player array distance code producing errors
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
well it is sangin ;) -
check player array distance code producing errors
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
dont want to spawn 100 triggers around my random ieds ;) thanks guys ill test it now. ---------- Post added at 23:28 ---------- Previous post was at 23:21 ---------- works great but now im getting 1 more error Error in expression <_ied = _iedrandom createVehicle (getpos _iedplace); _ied setPos [(getPos _ied> Error position: <_iedplace); _ied setPos [(getPos _ied> Error Undefined variable in expression: _iedplace this is the code waituntil {!isnil "bis_fnc_init"}; if (isServer) then { _gamelogic = center; _towns = nearestLocations [getPosATL _gamelogic, ["NameVillage","NameCity","NameCityCapital"], 25000]; for "_i" from 0 to 50 do { _iedrandom = ["Land_IED_v1_PMC","Land_IED_v2_PMC","Land_IED_v3_PMC","Land_IED_v4_PMC"] call BIS_fnc_selectrandom; _RandomTownPosition = position (_towns select (floor (random (count _towns)))); _distanceaway = 650; _list = _RandomTownPosition nearRoads _distanceaway; _Randomroad = count _list; _amount = random _Randomroad; _iedplace = _list select _amount; _offset = random 9; _ied = _iedrandom createVehicle (getpos _iedplace); _ied setPos [(getPos _ied select 0) + _offset, (getPos _ied select 1) + _offset, getPos _ied select 2]; [_ied] spawn ied_detonate; _ied setVehicleInit "this addAction ['Disarm IED','HOG_scripts\HOG_ieds\disarm.sqf','player distance _ied<3']"; processInitCommands; if (HOG_debug) then { [sgt,nil,rgroupChat,"Spawning IED + Debug ON."] call RE; sleep 0.2; _handle = [_ied,"IED","ColorGreen","mil_dot"] spawn HOG_debug_mkrs_fnc; }; //sleep 0.5; }; for "_i" from 0 to 50 do { _iedrandom = ["Land_IED_v1_PMC","Land_IED_v2_PMC","Land_IED_v3_PMC","Land_IED_v4_PMC"] call BIS_fnc_selectrandom; _pos = center; _radius = random 5000; _exp = "(1 + houses) * (1 - sea)"; _prec = 50; _bestplace = selectBestPlaces [_pos,_radius,_exp,_prec,1]; _spot = _bestplace select 0; _spot2 = _spot select 0; _spwpos = createMarkerLocal ["iedpos", _spot2]; "iedpos" call fnc_HOG_randomPos; _ied = _iedrandom createVehicle (getMarkerPos "iedpos"); _ied setVehicleInit "this addAction ['Disarm IED','HOG_scripts\HOG_ieds\disarm.sqf','player distance _ied<3']"; processInitCommands; [_ied] spawn ied_detonate; if (HOG_debug) then { [sgt,nil,rgroupChat,"Spawning IED + Debug ON."] call RE; sleep 0.2; _handle = [_ied,"IED","ColorGreen","mil_dot"] spawn HOG_debug_mkrs_fnc; }; //sleep 0.5; deleteMarker "iedpos"; }; }; -
Australians At War - Combined Ops
hogmason replied to [xdf]kanga's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
any idea how i can get this to work with norrins revive everything i try fails, maybe a list of classnames. -
spawning custom composition not working
hogmason posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
so i am trying to spawn a custom compostition but its not working this is what i have tried campp = ["taliban_camp", random 360, getMarkerPos "test"] execVM "HOG_scripts\HOG_camps\taliban_camp.sqf"; just in case this is the composition private ["_objs"]; _objs = [ ["Land_A_tent",[-2.33594,1.51538,0.0048542],48.5307,1,0], ["Land_Fire",[-3.51001,-2.67993,-0.000789642],17.7859,1,0], ["Land_A_tent",[-6.37085,1.0791,0.00257874],298.934,1,0], ["Land_A_tent",[-7.28345,-1.84814,0.00243378],276.064,1,0], ["Land_CamoNet_EAST",[-8.08618,-0.0556641,0.00974464],280.621,1,0], ["Land_Antenna",[-6.35962,-4.99707,0.00752831],235.023,1,0,this addeventhandler ["killed", { Target1_active = 0;publicvariable "Target1_active"; [sgt,nil,rgroupChat,"This Camp can no longer communicate with other insurgents"] call RE;}]] ]; _objs ---------- Post added at 11:04 ---------- Previous post was at 10:52 ---------- ill add to i get no error at all -
spawning custom composition not working
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah its a bloody good feature ;) -
spawning custom composition not working
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
man thank you so much that is great ---------- Post added at 16:35 ---------- Previous post was at 15:51 ---------- all works fine thanks guys -
spawning custom composition not working
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
i actually just worked that out lol but its still not working when i do this placed objectMapper.sqf inside of HOG_scripts\HOG_camps\ and i have taliban_camp.sqf in the same folder and in the main folder where the init.sqf is then i use to spawn it campp = ["taliban_camp",getDir center,getMarkerPos "test"] execVM "HOG_scripts\HOG_camps\objectMapper.sqf"; but nothing no error no camp nothing lol -
ok so i whipped this up to spawn an ammobox from a car addaction but cant figure out how to get it to spawn directly behind the vehicle _vehicle = _this select 0; _person = _this select 1; _dist = 1; [color="#FF0000"]_dir = random 180; // this needs to be rear of the car or _vehicle[/color] _pos = [((getPos _vehicle) select 0) + (sin _dir) * _dist, ((getPos _vehicle) select 1) + (cos _dir) * _dist, 0]; _deploy = "USBasicWeaponsBox" createVehicle (getPos _vehicle);
-
spawning custom composition not working
hogmason replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
nps mate appreciated the help ;)