Jump to content

hogmason

Member
  • Content Count

    405
  • Joined

  • Last visited

  • Medals

Everything posted by hogmason

  1. ok so im creating a arma composition "fuel_dump_ru1" found here http://www.armatechsquad.com/ArmA2Class151656165165341654165165165165f/A2/Objects/compositions/#document this is my script fuel_active = 1; publicvariable "fuel_active"; [color="#FF0000"]_fuelbunker = "fuel_dump_ru1" createVehicle (getMarkerPos "fuelbase")[/color]; _fuelbunker setDir random 290; _fuelbunker addeventhandler ["killed", { fuel_active = 0;publicvariable "fuel_active"; [sgt,nil,rgroupChat,"Enemy fuel has been destroyed"] call RE;}]; _fuelbunker setVehicleInit "_fuelbunker addEventHandler [""HandleDamage"",{(_this select 4) == ""PipeBomb""}]" ;format ["%1 = this; this setVehicleVarName ""%1""",_fuelbunker]; processInitCommands; however i am getting this error in my rpt Cannot create non-ai vehicle fuel_dump_ru1,
  2. thanks Samatra ill read that one ;) any way ive just spent the past 3 hours stuck on this issue. My code just isnt working and i have no idea why this is the piece of code im using to spawn the composition base _fuelMARKERposition = ["E_Patrol", false, ["safezone"]] call SHK_pos; _createfuelmarker = createmarker ["fuelbase", _fuelMARKERposition]; _createfuelmarker setMarkerType "Dot"; _createfuelmarker setMarkerColor "ColorRed"; _createfuelmarker setMarkerAlpha 0; _createfuelmarker setMarkerDir 90; _position = getmarkerpos "fuelbase"; _directionfuel = getDir _createfuelmarker; //spawn bunker to spawn fuel guns around _fuelbunker = [_position, _directionfuel, "fuel_dump_ru1"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf")); now this is the full code if (isServer) then { if (isnil "fuel_active") then {fuel_active = 0;}; waituntil {!isnil "bis_fnc_init"}; _r = random 360; _d = 30; //distance for defence line _distance = 40; //distance for barb wire line //create the east group _fuelmen = createGroup east; _fuelMARKERposition = ["E_Patrol", false, ["safezone"]] call SHK_pos; _createfuelmarker = createmarker ["fuelbase", _fuelMARKERposition]; _createfuelmarker setMarkerType "Dot"; _createfuelmarker setMarkerColor "ColorRed"; _createfuelmarker setMarkerAlpha 0; _createfuelmarker setMarkerDir 90; _position = getmarkerpos "fuelbase"; _directionfuel = getDir _createfuelmarker; //spawn bunker to spawn fuel guns around fuel_active = 1; publicvariable "fuel_active"; _fuelbunker = [_position, _directionfuel, "fuel_dump_ru1"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf")); //_fuelbunker setDir random 290; //_fuelbunker addeventhandler ["killed", { fuel_active = 0;publicvariable "fuel_active"; [sgt,nil,rgroupChat,"Enemy fuel has been destroyed"] call RE;}]; //_fuelbunker setVehicleInit "_fuelbunker addEventHandler [""HandleDamage"",{(_this select 4) == ""PipeBomb""}]" ;format ["%1 = this; this setVehicleVarName ""%1""",_fuelbunker]; //processInitCommands; //spawn fuelguns //_fueldefences = "GUE_WarfareBMGNest_PK" createVehicle [((getpos _fuelbunker) select 0) + sin 360 *_d, ((getpos _fuelbunker) select 1) + cos 360 *_d, 0]; _fueldefences0 = "GUE_WarfareBMGNest_PK" createVehicle [((getpos _fuelbunker) select 0) + sin 300 *_d, ((getpos _fuelbunker) select 1) + cos 300 *_d, 0]; _fueldefences0 setdir 300; _fueldefences1 = "GUE_WarfareBMGNest_PK" createVehicle [((getpos _fuelbunker) select 0) + sin 240 *_d, ((getpos _fuelbunker) select 1) + cos 240 *_d, 0]; _fueldefences1 setdir 240; _fueldefences2 = "GUE_WarfareBMGNest_PK" createVehicle [((getpos _fuelbunker) select 0) + sin 180 *_d, ((getpos _fuelbunker) select 1) + cos 180 *_d, 0]; _fueldefences2 setdir 180; _fueldefences3 = "GUE_WarfareBMGNest_PK" createVehicle [((getpos _fuelbunker) select 0) + sin 120 *_d, ((getpos _fuelbunker) select 1) + cos 120 *_d, 0]; _fueldefences3 setdir 120; _fueldefences4 = "GUE_WarfareBMGNest_PK" createVehicle [((getpos _fuelbunker) select 0) + sin 60 *_d, ((getpos _fuelbunker) select 1) + cos 60 *_d, 0]; _fueldefences4 setdir 60; //create bunkers _fuelbunker1 = "Land_fortified_nest_small_EP1" createVehicle [((getpos _fuelbunker) select 0) + sin 320 *_d, ((getpos _fuelbunker) select 1) + cos 320 *_d, 0]; _fuelbunker1 setdir 160; _fuelbunker2 = "Land_fortified_nest_small_EP1" createVehicle [((getpos _fuelbunker) select 0) + sin 250 *_d, ((getpos _fuelbunker) select 1) + cos 250 *_d, 0]; _fuelbunker2 setdir 90; _fuelbunker3 = "Land_fortified_nest_small_EP1" createVehicle [((getpos _fuelbunker) select 0) + sin 40 *_d, ((getpos _fuelbunker) select 1) + cos 40 *_d, 0]; _fuelbunker3 setdir 220; _fuelbunker4 = "Land_fortified_nest_small_EP1" createVehicle [((getpos _fuelbunker) select 0) + sin 92 *_d, ((getpos _fuelbunker) select 1) + cos 92 *_d, 0]; _fuelbunker4 setdir 280; _fuelbunker5 = "Land_fortified_nest_small_EP1" createVehicle [((getpos _fuelbunker) select 0) + sin 140 *_d, ((getpos _fuelbunker) select 1) + cos 140 *_d, 0]; _fuelbunker5 setdir 320; // Now the Wire line _fuelwiredef1 = "Fort_RazorWire" createVehicle [((getpos _fuelbunker) select 0) + sin 240 *_distance, ((getpos _fuelbunker) select 1) + cos 240 *_distance, 0]; publicVariable "_wiredef1"; _fuelwiredef1 setdir 240; _fuelwiredef2 = "Fort_RazorWire" createVehicle [((getpos _fuelbunker) select 0) + sin 180 *_distance, ((getpos _fuelbunker) select 1) + cos 180 *_distance, 0]; publicVariable "_wiredef2"; _fuelwiredef2 setdir 180; _fuelwiredef3 = "Fort_RazorWire" createVehicle [((getpos _fuelbunker) select 0) + sin 120 *_distance, ((getpos _fuelbunker) select 1) + cos 120 *_distance, 0];publicVariable "_wiredef3"; _fuelwiredef3 setdir 120; _fuelwiredef4 = "Fort_RazorWire" createVehicle [((getpos _fuelbunker) select 0) + sin 60 *_distance, ((getpos _fuelbunker) select 1) + cos 60 *_distance, 0]; publicVariable "_wiredef4"; _fuelwiredef4 setdir 60; //create bunkers _fuelwiredef1 = "Fort_RazorWire" createVehicle [((getpos _fuelbunker) select 0) + sin 320 *_distance, ((getpos _fuelbunker) select 1) + cos 320 *_distance, 0]; publicVariable "_wiredef1"; _fuelwiredef1 setdir 160; _fuelwiredef2 = "Fort_RazorWire" createVehicle [((getpos _fuelbunker) select 0) + sin 250 *_distance, ((getpos _fuelbunker) select 1) + cos 250 *_distance, 0]; publicVariable "_wiredef2"; _fuelwiredef2 setdir 90; _fuelwiredef3 = "Fort_RazorWire" createVehicle [((getpos _fuelbunker) select 0) + sin 40 *_distance, ((getpos _fuelbunker) select 1) + cos 40 *_distance, 0]; publicVariable "_wiredef3"; _fuelwiredef3 setdir 220; _fuelwiredef4 = "Fort_RazorWire" createVehicle [((getpos _fuelbunker) select 0) + sin 92 *_distance, ((getpos _fuelbunker) select 1) + cos 92 *_distance, 0]; publicVariable "_wiredef4"; _fuelwiredef4 setdir 280; _fuelwiredef5 = "Fort_RazorWire" createVehicle [((getpos _fuelbunker) select 0) + sin 140 *_distance, ((getpos _fuelbunker) select 1) + cos 140 *_distance, 0]; publicVariable "_wiredef5"; _fuelwiredef5 setdir 320; sleep 5; _upsgrp6 = [1,getmarkerpos "fuelbase",1,["fuelbase","spawned","fortify","delete:",120]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF"; sleep 0.3; //Set the skills {_x setSkill ["aimingAccuracy",0.65]} forEach units _fuelmen; {_x setSkill ["aimingShake",0.65]} forEach units _fuelmen; {_x setSkill ["aimingSpeed",0.65]} forEach units _fuelmen; {_x setSkill ["endurance",0.85]} forEach units _fuelmen; {_x setSkill ["spotDistance",0.99]} forEach units _fuelmen; {_x setSkill ["spotTime",0.85]} forEach units _fuelmen; {_x setSkill ["courage",0.85]} forEach units _fuelmen; {_x setSkill ["reloadSpeed",0.85]} forEach units _fuelmen; {_x setSkill ["commanding",0.85]} forEach units _fuelmen; {_x setSkill ["general",0.85]} forEach units _fuelmen; //Set up The DEBUG if (HOG_debug) then { [sgt,nil,rgroupChat,"Spawning fuel Base Debug ON."] call RE; fueldebug = { _fuelbase = _this select 0; [sgt,nil,rgroupChat,"Creating fuel Base Debug Markers."] call RE; _fuelmarker = createMarker[str(_fuelbase),position _fuelbase]; str(_fuelbase) setMarkerType "mil_box"; str(_fuelbase) setMarkerColor "ColorRed"; str(_fuelbase) setMarkerText "fuelbase"; sleep 0.2; [sgt,nil,rgroupChat,"fuel Base Debug Finished."] call RE; }; _handlerr = [_fuelbunker] spawn fueldebug; }; this is the error Error in expression <GUE_WarfareBMGNest_PK" createVehicle [((getpos _campbunker) select 0) + sin 300 > Error position: <getpos _campbunker) select 0) + sin 300 > Error getpos: Type Array, expected Object,Location File C:\Users\natho\Documents\ArmA 2 Other Profiles\=Mason=\missions\Operation_HOG_V_3.Chernarus\missions\spawners\Targets\camp_base.sqf, line 35 now that piece of code its telling me has an error DOESNT it works fine if i am spawning anything but a composition base. also if i un // the addeventhandler and vehicle init part i get this error Error in expression <cripts\objectMapper.sqf")); _campbunker addeventhandler ["killed", { camp_active> Error position: <addeventhandler ["killed", { camp_active> Error addeventhandler: Type Array, expected Object File C:\Users\natho\Documents\ArmA 2 Other Profiles\=Mason=\missions\Operation_HOG_V_3.Chernarus\missions\spawners\Targets\camp_base.sqf, line 25 p.s i know its a different variable name its from another script everything the same but different composition base. Does any 1 know what is wrong
  3. if i remember right the PlaceInBuilding.sqf places the units inside the closest building to them i think. if so u could do the below = now this will create 10 units u can make it as many as u want they will spawn within a random position at any given diameter of a marker then let the PlaceInBuilding.sqf place them in a random building then even u will not know where they will be. the code for "_i" from 0 to 10 do {//this part tells the server to create this script 10 times so ten men spawned change the 10 to how many you want //Set up Paramaters _My_group = createGroup east;//setting a group to create units from _distances = [30,50,70,80,120,200,250] call BIS_fnc_selectRandom;//distance around the marker you want these units to spawn. _Mkr_area = getMarkerPos "your marker";// the marker you want to spawn them in or around. _my_units = ["CDF_Soldier_Strela","CDF_Soldier_AR","CDF_Soldier_GL","CDF_Soldier_Officer"] BIS_fnc_selectRandom;//your units chosen randomly - have as many as u want. //lets start this crap _enemy = _my_units createUnit [_Mkr_area, _My_group];//creating the unit [_enemy] execVM "PlaceInBuilding.sqf"; }; use it like this " notice this will make them respawn but everytime 1 dies 10 more spawn you will have to ask the community how to fix that my_men_respawn = { [] spawn spawn_my_men; }; spawn_my_men = { for "_i" from 0 to 10 do {//this part tells the server to create this script 10 times so ten men spawned change the 10 to how many you want //Set up Paramaters _My_group = createGroup east;//setting a group to create units from _distances = [30,50,70,80,120,200,250] call BIS_fnc_selectRandom;//distance around the marker you want these units to spawn. _Mkr_area = getMarkerPos "your marker";// the marker you want to spawn them in or around. _my_units = ["CDF_Soldier_Strela","CDF_Soldier_AR","CDF_Soldier_GL","CDF_Soldier_Officer"] BIS_fnc_selectRandom;//your units chosen randomly - have as many as u want. //lets start this crap _enemy = _my_units createUnit [_Mkr_area, _My_group];//creating the unit [_enemy] execVM "PlaceInBuilding.sqf"; _mymen addEventHandler["killed", { (_this select 0) spawn my_men_respawn; }]; // lets give em some skill {_x setSkill ["aimingAccuracy",0.65]} forEach units _mymen; {_x setSkill ["aimingShake",0.65]} forEach units _mymen; {_x setSkill ["aimingSpeed",0.65]} forEach units _mymen; {_x setSkill ["endurance",0.85]} forEach units _mymen; {_x setSkill ["spotDistance",0.99]} forEach units _mymen; {_x setSkill ["spotTime",0.85]} forEach units _mymen; {_x setSkill ["courage",0.85]} forEach units _mymen; {_x setSkill ["reloadSpeed",0.85]} forEach units _mymen; {_x setSkill ["commanding",0.85]} forEach units _mymen; {_x setSkill ["general",0.85]} forEach units _mymen; }; }; if (isServer) then { waituntil {!isnil "bis_fnc_init"}; [] spawn spawn_my_men; }; now you dont need to use this im just giving you ideas.
  4. you can try this create the 3 men via script just place a functions module on the map and a unit from the east faction in the corner of the map presence 0% the code my_men_respawn = { sleep 600; // this makes it wait 600 secounds before respawn [] spawn spawn_my_men; }; spawn_my_men = { _mymen = [getMarkerpos "your_marker_name_here", EAST, 3] call BIS_fnc_spawnGroup _handler = [_mymen] execVM "PlaceInBuilding.sqf"; _mymen addEventHandler["killed", { (_this select 0) spawn my_men_respawn; }]; // lets give em some skill {_x setSkill ["aimingAccuracy",0.65]} forEach units _mymen; {_x setSkill ["aimingShake",0.65]} forEach units _mymen; {_x setSkill ["aimingSpeed",0.65]} forEach units _mymen; {_x setSkill ["endurance",0.85]} forEach units _mymen; {_x setSkill ["spotDistance",0.99]} forEach units _mymen; {_x setSkill ["spotTime",0.85]} forEach units _mymen; {_x setSkill ["courage",0.85]} forEach units _mymen; {_x setSkill ["reloadSpeed",0.85]} forEach units _mymen; {_x setSkill ["commanding",0.85]} forEach units _mymen; {_x setSkill ["general",0.85]} forEach units _mymen; }; if (isServer) then { waituntil {!isnil "bis_fnc_init"}; [] spawn spawn_my_men; }; bit rushed but should work let me know when i get home ill double check
  5. [color="#FF0000"]if (isServer) then {[/color] // Define variables. _marker = _this select 0; _count = _this select 1; _wait = 0; _position = getmarkerPos _marker; _possible_explosives = ["ARTY_Sh_105_HE","ARTY_Sh_122_HE","ARTY_R_120mm_HE_Rocket","ARTY_R_227mm_HE_Rocket","B_23mm_AA","B_30x113mm_M789_HEDP","B_30mm_HE","R_57mm_HE","R_80mm_HE","R_M136_AT", "R_RPG18_AT","R_SMAW_HEAA","R_SMAW_HEDP","R_PG7V_AT","R_PG7VL_AT","R_PG7VR_AT","R_OG7_AT","R_Hydra_HE","M_Stinger_AA","M_Javelin_AT","M_TOW_AT","M_Strela_AA","M_9M311_AA","M_R73_AA","M_Vikhr_AT", "M_Hellfire_AT","M_Maverick_AT","M_Sidewinder_AA","M_Sidewinder_AA_F35","M_Igla_AA","M_AT5_AT","M_AT6_AT","M_AT9_AT","M_AT13_AT","G_Camel_HE"]; // Get started. for "_i" from 1 to (_count) do { sleep(random (0.5 + _wait)); _wait = _wait + 0.05; _number = round(random 35); _chosen_explosive = _possible_explosives select _number; _x = _chosen_explosive createVehicle _position; }; [color="#FF0000"]};[/color]
  6. OK so i am trying to use the arty module for UPSMON without triggers and scripts i have the arty guns spawn 2000 mters from the task area and need the ai at the task to relay the enemy positions for firesupport is this how its done _artygunner1 = _artymen createUnit ["RU_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"]; _artygunner1 assignAsGunner _artygun1; _artygunner1 moveInGunner _artygun1; [color="#FF0000"] nul=[_artygunner1] execVM "scripts\UPSMON\MON_artillery_add.sqf";[/color] or do i need more,
  7. just a quick question i am creating debug markers to spawn on all my random AA guns on the map the way i have done this is below but fist 1 question the code highlighted in red is working but is it correct or should it have _x instead of _aashooter if (HOG_debug) then { [sgt,nil,rgroupChat,"Spawning Island AA Defence Debug ON."] call RE; markerfollow = { _aaweapon = _this select 0; _aashooter = _this select 1; [sgt,nil,rgroupChat,"Creating Island AA Defence Debug Markers."] call RE; [color="#FF0000"]_aamarker = createMarker[str(_aashooter),position _aashooter]; str(_aashooter) setMarkerType "mil_box"; str(_aashooter) setMarkerColor "ColorRed"; str(_aashooter) setMarkerText "AA";[/color] sleep 0.2; [sgt,nil,rgroupChat,"Island AA Defence Debug Finished."] call RE; }; _handler = [_aagun, _aagunner] spawn markerfollow; }; also how would i add the _aamarker to my HOGmarkerArray so JIP PLAYERS recieve the positions this is my HOGmarkerArray HOGmarkerArray = ["taskarea","E_Patrol","REIN","Task_Choppers","MissionAO"]; onPlayerConnected "{_x setMarkerPos (getMarkerPos _x)} forEach HOGmarkerArray";
  8. ok so i have this script to create some markers and create a task and call for enemy spawning scripts if isserver then { //Make sure Functions Module is loaded waituntil {!isnil "bis_fnc_init"}; //create task Marker _taskMARKERposition = ["center_positon", false, ["safezone"]] call SHK_pos; _createTASKmarker = createmarker ["taskarea", _taskMARKERposition]; _createTASKmarker setMarkerType "mil_objective"; _createTASKmarker setMarkerColor "ColorRed"; sleep 0.5; //setup Enemy Airborn Units Patrol Marker _createREINFORCEMENTSmarker1 = createmarker ["E_Patrol",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker1 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker1 setmarkersize [400,400]; _createREINFORCEMENTSmarker1 setMarkerAlpha 0; //setup Enemy Airborn Reinforcements Marker _createREINFORCEMENTSmarker2 = createmarker ["REIN",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker2 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker2 setmarkersize [600,600]; //_createREINFORCEMENTSmarker2 setMarkerAlpha 0; //setup Enemy Task Area Chopper Patrol Marker _createREINFORCEMENTSmarker3 = createmarker ["Task_Choppers",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker3 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker3 setmarkersize [1500,1500]; _createREINFORCEMENTSmarker3 setMarkerAlpha 0; sleep 0.3; //create the task for players HOGtask = player createsimpleTask ["Destroy Enemy Supplies"]; HOGtask setsimpletaskdescription ["Search and destroy Enemy Units and Enemy H.Q and Supply Dump within the task area.","Destroy Enemy Supplies",""]; HOGtask setTaskState "Assigned"; player setcurrenttask HOGtask; taskhint ["New Task Created\nCheck Map For Location", [0.600000,0.839215,0.466666,1], "taskCurrent"]; //Create Task Targets [] spawn Task_Targets; sleep 0.5; //Setup Enemy Units [] spawn Task_Enemy; sleep 0.5; //setup Enemy Static Units [] spawn Task_Static; sleep 0.5; //setup Enemy Chopper Patrol [] spawn Task_choppers; sleep 0.5; //Setup Enemy Airborne Reinforcements [] spawn Task_reinforce_Start; sleep 10; //Setup EAST units Checker [] spawn Task_East_chkr; sleep 0.5; //setup End Of Task waitUntil{(Target1_active ==0) && (Target2_active ==0) && (Enemy_Dead ==1)}; taskhint ["Task Accomplished\nGood Job", [0.600000,0.839215,0.466666,1], "taskDone"]; HOGtask setTaskState "Succeeded"; sleep 0.5; //Setup Task Cleaning [] spawn Task_Cleaner; }; now this works great on the editors testing BUT on a dedi everything gets created and all enemy are spawned at the task site " which all get luanched of the above code BUT i dont get the task coming up so no text hint saying new task and no task selection on map. just nothing this is the create simple task part //create the task for players HOGtask = player createsimpleTask ["Destroy Enemy Supplies"]; HOGtask setsimpletaskdescription ["Search and destroy Enemy Units and Enemy H.Q and Supply Dump within the task area.","Destroy Enemy Supplies",""]; HOGtask setTaskState "Assigned"; player setcurrenttask HOGtask; taskhint ["New Task Created\nCheck Map For Location", [0.600000,0.839215,0.466666,1], "taskCurrent"];
  9. Ok so i got the tasks working and showing on the dedi BUT now everytime a player joins he gets a task and then the task markers are moved to a new spot so its like the server gives the JIP player a new task. this is what the code now looks like p.s i untagged the markers code at top from isServer tags due to JIP players not seing any markers at all //Make sure Functions Module is loaded waituntil {!isnil "bis_fnc_init"}; //create task Marker _taskMARKERposition = ["center_positon", false, ["safezone"]] call SHK_pos; _createTASKmarker = createmarker ["taskarea", _taskMARKERposition]; _createTASKmarker setMarkerType "mil_objective"; _createTASKmarker setMarkerColor "ColorRed"; sleep 0.5; //setup Enemy Airborn Units Patrol Marker _createREINFORCEMENTSmarker1 = createmarker ["E_Patrol",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker1 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker1 setmarkersize [400,400]; _createREINFORCEMENTSmarker1 setMarkerAlpha 0; //setup Enemy Airborn Reinforcements Marker _createREINFORCEMENTSmarker2 = createmarker ["REIN",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker2 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker2 setmarkersize [600,600]; //_createREINFORCEMENTSmarker2 setMarkerAlpha 0; //setup Enemy Task Area Chopper Patrol Marker _createREINFORCEMENTSmarker3 = createmarker ["Task_Choppers",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker3 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker3 setmarkersize [1500,1500]; _createREINFORCEMENTSmarker3 setMarkerAlpha 0; sleep 0.5; if (isServer) then { //Create Task Targets [] spawn Task_Targets; sleep 0.5; //Setup Enemy Units [] spawn Task_Enemy; sleep 0.5; //setup Enemy Static Units [] spawn Task_Static; sleep 0.5; //setup Enemy Chopper Patrol [] spawn Task_choppers; sleep 0.5; //Setup Enemy Airborne Reinforcements [] spawn Task_reinforce_Start; sleep 10; //Setup EAST units Checker [] spawn Task_East_chkr; sleep 0.5; //setup End Of Task }; //create the task for players HOGtask = player createsimpleTask ["Destroy Enemy Supplies"]; HOGtask setsimpletaskdescription ["Search and destroy Enemy Units and Enemy H.Q and Supply Dump within the task area.","Destroy Enemy Supplies",""]; HOGtask setTaskState "Assigned"; player setcurrenttask HOGtask; taskhint ["New Task Created\nCheck Map For Location", [0.600000,0.839215,0.466666,1], "taskCurrent"]; waitUntil{(Target1_active ==0) && (Target2_active ==0) && (Enemy_Dead ==1)}; sleep 0.5; taskhint ["Task Accomplished\nGood Job", [0.600000,0.839215,0.466666,1], "taskDone"]; HOGtask setTaskState "Succeeded"; sleep 0.5; [] spawn Task_Cleaner;
  10. why are none of my parameters working description.ext class Params { class DayTime { //paramsArray[0] title = "Time Of Day"; values[] = {-6,0,8,13}; default = 0; texts[] = {"Morning", "Clear day", "Sundown", "Night"}; }; class Revive { // paramsArray[1] title = "Number of Revives"; values[] = {2000,1000,20,10,7,5}; default = 1000; texts[] = {"No Revive","Infinite - Cadet","20 - Easy ","10 - Normal","7 - Hard","5 - Extreme"}; }; class debug { // paramsArray[2] title = "Debug Y/N"; values[] = {true,false}; default = false; texts[] = {"yes","no"}; }; }; init.sqf if(isNil "paramsArray") then{ paramsArray = [ 0, // Time of Day 1000, // Revive true, //debug 20 //task count ]; }; HOG_debug = (paramsarray select 2);
  11. got it working ------ YEP all that addiction to running everything by if (isServer) got me in a pickle so i had to remove all that if (isServer) and only wrap it around the spawning stuff. cheers for the help guys really appreciate it and learnt alot about if (isServer). ;)
  12. cheers mate ill try that tomoz appreciate the help so ill; just get my head around all that so this is what you are saying only change the debug word so i.e if(isNil "HOG_debug_setting") then {HOG_debug_setting = 0;}; if(HOG_debug_setting == 0) then {HOG_debug = false;}; if(HOG_debug_setting == 1) then {HOG_debug = true;}; and not if(isNil "HOG_debug_setting") then {HOG_debug_setting = 0;}; if(HOG_debug_setting == 0) then {HOG_debug_setting = false;}; if(HOG_debug_setting == 1) then {HOG_debug_setting = true;};
  13. this starts the tasks if (isServer) then { for "_x" from 1 to 50 do {[] call Task_Creator;}; }; thanks _MaSSive that was a mistake in a few of my sqf's ;)
  14. yeah i tried that panther so my order was params 0 was time params 1 was revive params 2 was debug then i tried what hoz said params 2 to time params 3 to revive params 4 to debug and changed the part in revive init from 1 -3 but then the revive did not work so i think that is no longer the case. as for the true and false to 0 and 1 that just may be it ill test it now thanks mate. and thanks to all great help sorry for my noobness lol ;) ---------- Post added at 12:07 ---------- Previous post was at 12:06 ---------- also if i change the values to 0, 1 would i then have to change the if (HOG_debug) then { to something like if (HOG_debug >1) then {
  15. lmaorofl funny that -6 never noticed that i actually got it of google lol cheers mate. Do you see a issue with the debug Param ---------- Post added at 11:02 ---------- Previous post was at 10:56 ---------- so in other words if (isServer) then { skiptime (((paramsarray select 0) - daytime + 24) % 24); };
  16. yeah i took the addtask and endtask preprocessed parts out and just put it all back on the main script but that still dont work
  17. so maybe this //Make sure Functions Module is loaded waituntil {!isnil "bis_fnc_init"}; [color="#0000FF"]if isserver then {[/color] //create task Marker _taskMARKERposition = ["center_positon", false, ["safezone"]] call SHK_pos; _createTASKmarker = createmarker ["taskarea", _taskMARKERposition]; _createTASKmarker setMarkerType "mil_objective"; _createTASKmarker setMarkerColor "ColorRed"; sleep 0.5; //setup Enemy Airborn Units Patrol Marker _createREINFORCEMENTSmarker1 = createmarker ["E_Patrol",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker1 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker1 setmarkersize [400,400]; _createREINFORCEMENTSmarker1 setMarkerAlpha 0; //setup Enemy Airborn Reinforcements Marker _createREINFORCEMENTSmarker2 = createmarker ["REIN",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker2 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker2 setmarkersize [600,600]; //_createREINFORCEMENTSmarker2 setMarkerAlpha 0; //setup Enemy Task Area Chopper Patrol Marker _createREINFORCEMENTSmarker3 = createmarker ["Task_Choppers",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker3 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker3 setmarkersize [1500,1500]; _createREINFORCEMENTSmarker3 setMarkerAlpha 0; sleep 0.5; [color="#0000FF"]};[/color] [color="#FF0000"] //Calls Task info //create the task for players HOGtask = player createsimpleTask ["Destroy Enemy Supplies"]; HOGtask setsimpletaskdescription ["Search and destroy Enemy Units and Enemy H.Q and Supply Dump within the task area.","Destroy Enemy Supplies",""]; HOGtask setTaskState "Assigned"; player setcurrenttask HOGtask; taskhint ["New Task Created\nCheck Map For Location", [0.600000,0.839215,0.466666,1], "taskCurrent"];[/color] [color="#0000FF"]if isserver then {[/color] //Create Task Targets [] spawn Task_Targets; sleep 0.5; //Setup Enemy Units [] spawn Task_Enemy; sleep 0.5; //setup Enemy Static Units [] spawn Task_Static; sleep 0.5; //setup Enemy Chopper Patrol [] spawn Task_choppers; sleep 0.5; //Setup Enemy Airborne Reinforcements [] spawn Task_reinforce_Start; sleep 10; //Setup EAST units Checker [] spawn Task_East_chkr; sleep 0.5; //setup End Of Task waitUntil{(Target1_active ==0) && (Target2_active ==0) && (Enemy_Dead ==1)}; sleep 0.5; [color="#0000FF"]}; [/color] [color="#FF0000"] taskhint ["Task Accomplished\nGood Job", [0.600000,0.839215,0.466666,1], "taskDone"]; HOGtask setTaskState "Succeeded"; [/color] [color="#0000FF"]if isserver then { [/color] //Setup Task Cleaning [] spawn Task_Cleaner; [color="#0000FF"]}; [/color] ---------- Post added at 10:49 ---------- Previous post was at 10:41 ---------- nope that diddnt work ;(
  18. cheers mate but still not showing i done createtask.sqf waituntil {!isnil "bis_fnc_init"}; if isserver then { //create task Marker _taskMARKERposition = ["center_positon", false, ["safezone"]] call SHK_pos; _createTASKmarker = createmarker ["taskarea", _taskMARKERposition]; _createTASKmarker setMarkerType "mil_objective"; _createTASKmarker setMarkerColor "ColorRed"; sleep 0.5; //setup Enemy Airborn Units Patrol Marker _createREINFORCEMENTSmarker1 = createmarker ["E_Patrol",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker1 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker1 setmarkersize [400,400]; _createREINFORCEMENTSmarker1 setMarkerAlpha 0; //setup Enemy Airborn Reinforcements Marker _createREINFORCEMENTSmarker2 = createmarker ["REIN",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker2 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker2 setmarkersize [600,600]; //_createREINFORCEMENTSmarker2 setMarkerAlpha 0; //setup Enemy Task Area Chopper Patrol Marker _createREINFORCEMENTSmarker3 = createmarker ["Task_Choppers",getMarkerPos "taskarea"]; _createREINFORCEMENTSmarker3 setmarkershape "ELLIPSE"; _createREINFORCEMENTSmarker3 setmarkersize [1500,1500]; _createREINFORCEMENTSmarker3 setMarkerAlpha 0; sleep 0.5; [color="#FF0000"] //Calls Task info [] spawn addtasks;[/color] sleep 0.5; //Create Task Targets [] spawn Task_Targets; sleep 0.5; //Setup Enemy Units [] spawn Task_Enemy; sleep 0.5; //setup Enemy Static Units [] spawn Task_Static; sleep 0.5; //setup Enemy Chopper Patrol [] spawn Task_choppers; sleep 0.5; //Setup Enemy Airborne Reinforcements [] spawn Task_reinforce_Start; sleep 10; //Setup EAST units Checker [] spawn Task_East_chkr; sleep 0.5; //setup End Of Task [color="#FF0000"] waitUntil{(Target1_active ==0) && (Target2_active ==0) && (Enemy_Dead ==1)}; sleep 0.5; [] spawn endtasks;[/color] sleep 0.5; //Setup Task Cleaning [] spawn Task_Cleaner; }; [] spawn addtasks; is waituntil {!isnil "BIS_fnc_init"}; //create the task for players HOGtask = player createsimpleTask ["Destroy Enemy Supplies"]; HOGtask setsimpletaskdescription ["Search and destroy Enemy Units and Enemy H.Q and Supply Dump within the task area.","Destroy Enemy Supplies",""]; HOGtask setTaskState "Assigned"; player setcurrenttask HOGtask; taskhint ["New Task Created\nCheck Map For Location", [0.600000,0.839215,0.466666,1], "taskCurrent"]; and [] spawn endtasks; is waituntil {!isnil "BIS_fnc_init"}; taskhint ["Task Accomplished\nGood Job", [0.600000,0.839215,0.466666,1], "taskDone"]; HOGtask setTaskState "Succeeded"; both endtasks and addtasks are precompiled using task_Preloader.sqf ======= this is loaded from my main init.sqf using = execVM "missions\task_Preloader.sqf"; if isserver then { [color="#FF0000"] addtasks = compile (preprocessFileLineNumbers "missions\Addtasks.sqf"); endtasks = compile (preprocessFileLineNumbers "missions\endtasks.sqf");[/color] Task_Loader = compile (preprocessFileLineNumbers "missions\Task_Loader.sqf"); Task_Creator = compile (preprocessFileLineNumbers "missions\Task_creator.sqf"); Task_Targets = compile (preprocessFileLineNumbers "missions\spawners\Targets\task_targets.sqf"); Task_Enemy = compile (preprocessFileLineNumbers "missions\spawners\Task_Enemy\task_enemy.sqf"); Task_Static = compile (preprocessFileLineNumbers "missions\spawners\Task_Enemy\task_statics.sqf"); Task_choppers = compile (preprocessFileLineNumbers "missions\spawners\Task_Enemy\task_chopper.sqf"); Task_reinforce_Start = compile (preprocessFileLineNumbers "missions\spawners\Task_Enemy\task_reinforce.sqf"); Task_Reinforce_Spawn = compile (preprocessFileLineNumbers "missions\spawners\Task_Enemy\Task_Reinforcements.sqf"); Task_East_chkr = compile (preprocessFileLineNumbers "missions\East_Checker.sqf"); Task_Cleaner = compile (preprocessFileLineNumbers "missions\cleaner\endtask.sqf"); };
  19. well i got it working by moving this class Params { class DayTime { title = "Time Of Day"; values[] = {-6,0,8,13}; texts[] = {"Morning", "Clear day", "Sundown", "Night"}; default = 0; }; class Revive { title = "Number of Revives"; values[] = {2000,1000,20,10,7,5}; texts[] = {"No Revive","Infinite - Cadet","20 - Easy ","10 - Normal","7 - Hard","5 - Extreme"}; default = 1000; }; class debug { title = "Debug Y/N"; values[] = {true,false}; texts[] = {"yes","no"}; default = false; }; }; up to the top of the description file below the class header i.e class Header { gameType = Coop; minPlayers = 1; maxPlayers = 25; }; showCompass = 1; showGPS = 1; showMap = 1; showWatch = 1; respawn = "BASE"; respawndelay = 4; disabledAI = 1; debriefing=1; loadScreen = "HardcoreMisc\pics\ophog.paa"; onLoadMission = "Operation H.O.G SOCOMD Command by =Mason= Presented by Hardcore Online Gaming"; onLoadIntro = "Operation H.O.G SOCOMD Command by =Mason= Presented by Hardcore Online Gaming"; ///////////////////////////////////////// // Paramaters // ///////////////////////////////////////// class Params { class DayTime { title = "Time Of Day"; values[] = {-6,0,8,13}; texts[] = {"Morning", "Clear day", "Sundown", "Night"}; default = 0; }; class Revive { title = "Number of Revives"; values[] = {2000,1000,20,10,7,5}; texts[] = {"No Revive","Infinite - Cadet","20 - Easy ","10 - Normal","7 - Hard","5 - Extreme"}; default = 1000; }; class debug { title = "Debug Y/N"; values[] = {true,false}; texts[] = {"yes","no"}; default = false; }; }; so it loads before all the #include's and sounds and all that jazz also in my init i tested and found both ways worked BUT.................... i am still having an issue with my debug option and time of day option in my params so... the revive selection is working all my defualts are showing correctly " before they were not on my defualts" But still now when i change to debug yes or time of day to night etc... nothing happens i know my debug wors for if i change it to debug = true from debug = (parramsArray select 2); the server shows my debug markers. so again my debug code is description.ext class Params { class DayTime { title = "Time Of Day"; values[] = {-6,0,8,13}; texts[] = {"Morning", "Clear day", "Sundown", "Night"}; default = 0; }; class Revive { title = "Number of Revives"; values[] = {2000,1000,20,10,7,5}; texts[] = {"No Revive","Infinite - Cadet","20 - Easy ","10 - Normal","7 - Hard","5 - Extreme"}; default = 1000; }; [color="#FF0000"] class debug { title = "Debug Y/N"; values[] = {true,false}; texts[] = {"yes","no"}; default = false; };[/color] }; in my init HOG_debug = (paramsArray select 2); ==== also above this is have ==== if(isNil "paramsArray") then{ paramsArray = [0, 1000, true]; }; and my debug code is triggerd by inside all my scripts if (HOG_debug) then { ==what i want in here== }; can any 1 see what i have done wrong this has me stuffed
  20. never thought of it like that cheers mate ill try that now ;) ---------- Post added at 00:00 ---------- Previous post was at 23:52 ---------- bugger that still diddnt work
  21. Ok so i am trying to get a marker to follow a enemy jet i spawn via script so i can determine that it is doin what i whish it to do this is what i have done but it doesnt work any ideas. on map i have a marker called debugjet then the code JetDeathLoopdeath ={ sleep 5; [] spawn JetMapPatrol; }; JetMapPatrol ={ //hint "spawn a10"; _grp = createGroup east; _a10 = createVehicle ["Su34", getmarkerpos "Enemy_Airport", [], 250, "FLY"]; _a10 setDir 290; _dir = 290; _speed = 500; _a10 setVelocity [(sin _dir * _speed),(cos _dir * _speed), 0]; _a10 addEventHandler["killed", { (_this select 0) spawn JetDeath; }]; //create pilot and move in plane _pilot = _grp createUnit ["RU_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"]; _pilot moveInDriver _a10; _pilot = driver _a10; _pilot setskill 1; _wp1 = _grp addWaypoint [getPos eair1, 0]; [_grp, 0] setWaypointType "SAD"; [_grp, 0] setWaypointCompletionRadius 80; _wp2 = _grp addWaypoint [getPos eair2, 0]; [_grp, 0] setWaypointType "SAD"; [_grp, 0] setWaypointCompletionRadius 80; _wp3 = _grp addWaypoint [getPos eair3, 0]; [_grp, 0] setWaypointType "SAD"; [_grp, 0] setWaypointCompletionRadius 80; _wp4 = _grp addWaypoint [getPos eair4, 0]; [_grp, 0] setWaypointType "CYCLE"; [_grp, 0] setWaypointCompletionRadius 80; }; ///////////////////////////////////////////////////////////////////////////////////////// if (isserver) then { [b] _debug = true;[/b] //hint "spawning jets"; [] spawn JetMapPatrol; sleep 5; [color="#FF0000"]////////=====> now the debug code <==////////////////////////////////////////////////////////////////////////[/color] [b] if(_debug) then { hint "debug aircraft"; [] spawn { while {not isnull _grp} do { "debugjet" setMarkerPos getpos _grp; sleep 0.5; }; }; };[/b] };
  22. ok so i got the debug marker going now i am creating the same marker for 10 vehicles im using this it works fine in editor test but not on dedi _target1m = _this select 0; [sgt,nil,rgroupChat,"Creating supply Dump Debug Markers."] call RE; _target1marker = createMarker[str(_target1m),position _target1m]; str(_target1m) setMarkerType "mil_dot"; str(_target1m) setMarkerColor "ColorOrange"; str(_target1m) setMarkerText "supply Dump"; this marker doesnt move i dont need it to move. now i tried the _x instead of _target1m but it doesnt seem to work. i.e _target1marker = createMarker[str(_x),position _x]; str(_x) setMarkerType "mil_dot"; str(_x) setMarkerColor "ColorOrange"; str(_x) setMarkerText "supply Dump";
  23. ok well in game if i select say night for time of day its still day when game loads up and debug yes or no its always no -- to sum it up the default dont work and the selection i choose in game doesnt work.
×