Jump to content

hogmason

Member
  • Content Count

    405
  • Joined

  • Last visited

  • Medals

Everything posted by hogmason

  1. Thanks twirly ill check it out mate. Dont supose u know how i can space the aa guns out so they dont spawn near each other mate or even a command to get me underway. Thanks again mate ur always helpfull.
  2. no thats not intended lol ive got to // that out this is all still testing
  3. Also why is the below code aa.sqf working but when i modify it for another code it doesnt so i use this code /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////// //////////////////////////////////// /////////////////////// Enemy AA Script For Operation HOG BY =Mason= ///////////////////////////////////// ////////////////////// ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //_aapod = createVehicle ["Igla_AA_pod_East", getmarkerpos "center", [], 0, "NONE"]; <=== this works if all fails AALoop ={ sleep 5; [] spawn createAA; }; [color="#FF0000"]createAA ={ for "_i" from 0 to 10 do { _grp = createGroup east; _aadis = [1000,2000,3000,4000] call BIS_fnc_selectRandom; _pos = [getMarkerPos "center", _aadis, random 359, false, [0, 0]] call SHK_pos; _aapod = createVehicle ["Igla_AA_pod_East", _pos, [], 0, "NONE"]; _aapod setDir random 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; {_x setSkill ["aimingAccuracy",0.65]} forEach units _grp; {_x setSkill ["aimingShake",0.65]} forEach units _grp; {_x setSkill ["aimingSpeed",0.65]} forEach units _grp; {_x setSkill ["endurance",0.85]} forEach units _grp; {_x setSkill ["spotDistance",0.99]} forEach units _grp; {_x setSkill ["spotTime",0.85]} forEach units _grp; {_x setSkill ["courage",0.85]} forEach units _grp; {_x setSkill ["reloadSpeed",0.85]} forEach units _grp; {_x setSkill ["commanding",0.85]} forEach units _grp; {_x setSkill ["general",0.85]} forEach units _grp; if (debug) then { [sgt,nil,rgroupChat,"Spawning Island AA Defence Debug ON."] call RE; markerfollow = { _aagun = _this select 0; _aaman = _this select 1; hint format["%1",_aaman]; [sgt,nil,rgroupChat,"Creating Island AA Defence Debug Markers."] call RE; _m = createMarker[str(_aaman),position _aaman]; str(_aaman) setMarkerType "AntiAir"; sleep 0.2; [sgt,nil,rgroupChat,"Island AA Defence Debug Finished."] call RE; }; _handle = [_aapod,_gunner] spawn markerfollow; }; }; };[/color] ///////////////////////////////////////////////////////////////////////////////////////// if (isserver) then { [] spawn createAA; //sleep 50000; }; and it works in that whole script but then i change a few names and add it to this script and it doesnt work nothing spawns and no markers or hints appear. p.s the men and vehicles do spawn but no the static (in red) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////// //////////////////////////////////////////////////////////////////////// /////////////////////// Spawn Enemy Script For Operation HOG SOCOMD Command ///////////////////////////////////////////// EDITED 28/5/2012 ////// ////////////////////// ////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if isserver then { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ////////////////////////////////////// // ---------- Spawn Infantry ---------- ////////////////////////////////////// // ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// for "_i" from 0 to 4 do { _upsgrp1 = [1,getmarkerpos "taskarea",1,["taskarea","spawned","random","fortify","delete:",120]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF"; _upsgrp2 = [1,getmarkerpos "taskarea",1,["taskarea","spawned","random","delete:",120]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF"; sleep 0.3; }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ////////////////////////////////////// // ---------- Spawn Armour ---------- ////////////////////////////////////// // ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////// //FOCKERS Vehicle Spaced Spawn //[FOCK] Mikie J //////////////////////// for "_i" from 0 to 10 do { _grp2 = []; _spawn2 = getMarkerPos "taskarea"; _offset2 = [30,50,70,80,120,200,250] call BIS_fnc_selectRandom; _offset3 = random 100; _prec2 = random 100; _exp2 = "(1 - houses) * (1 - houses)"; _bestplace2 = selectBestPlaces [_spawn2,_offset2,_exp2,_prec2,1]; _spot4 = _bestplace2 select 0; _spot3 = _spot4 select 0; _safespawn2 = _spot3 findEmptyPosition [10, 75, "tank"]; _randomvehicle2 = ["T34_TK_EP1","BRDM2_ATGM_TK_EP1","LandRover_MG_TK_EP1","T72_TK_EP1","ZSU_TK_EP1"] call BIS_fnc_selectRandom; _direction2 = random 359; _vehicleCreated =[_safespawn2, _direction2, _randomvehicle2, EAST] call BIS_fnc_spawnvehicle; _vehiclegroup = _vehicleCreated select 2;//group [(units _vehiclegroup) select 0, "taskarea","spawned","nofollow","random","nowait","delete:",120] execVM "scripts\upsmon.sqf"; //[_vehiclegroup, "terrorHelpers"] spawn FOCK_fnc_VehiclePatrolMkr; }; sleep 0.3; [color="#FF0000"]/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ////////////////////////////////////// // ---------- Spawn Static ---------- ////////////////////////////////////// // ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// for "_i" from 0 to 5 do { _grp1 = createGroup east; _staticpos = getmarkerpos "center"; _staticdis = [50,100,200,300,400,500] call BIS_fnc_selectRandom; _staticdir = random 360; _staticpos = [(_centerpos select 0) + sin(_staticdir)*_staticdis,(_staticpos select 1) + cos(_staticdir)*_staticdis]; _staticpod = createVehicle ["Igla_AA_pod_East", _staticpos, [], 0, "NONE"]; _staticpod setdir (random 290); _staticgunner = _grp1 createUnit ["RU_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"]; _staticgunner assignAsGunner _staticpod; _staticgunner moveInGunner _staticpod; {_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 Task Area AA Defence + Debug ON."] call RE; staticmarkerfollow = { _staticgun = _this select 0; _staticman = _this select 1; [sgt,nil,rgroupChat,"Spawning Task Area AA Defence Debug Markers."] call RE; _m1 = createMarker[str(_staticman),position _staticman]; str(_staticman) setMarkerType "Dot"; sleep 0.2; [sgt,nil,rgroupChat,"Spawning Task Area AA Defence Finished."] call RE; }; _handle = [_staticpod,_staticgunner] spawn staticmarkerfollow; }; };[/color] sleep 0.2; [] spawn E_reinforce; };
  4. thanks guys all those work perfectly after twirly's comment on issues with spawning in things i.s buildings / water i have decided maybe shk_pos be the best option. But i have one last question is there away to set a distance between each aa gun so they dont spawn next to each other i.e maybe check to see no other gun is within 1000m. This is the codes that work from u guys _aadis = [200,500,1000,2000,3000,4000,5000] call BIS_fnc_selectRandom; _pos = [getMarkerPos "center", _aadis, random 359, false, [0, 0]] call SHK_pos; _aapod = createVehicle ["Igla_AA_pod_East", _pos, [], 0, "NONE"]; _aapod setDir random 290; _aapod addEventHandler["killed", { (_this select 0) spawn AALoop; }]; _centerpos = getmarkerpos "center"; _aadis = [200,500,1000,2000,3000,4000,5000] call BIS_fnc_selectRandom; _aadir = random 360; _aapos = [(_centerpos select 0) + sin(_aadir)*_aadis,(_centerpos select 1) + cos(_aadir)*_aadis]; _aapod = createVehicle ["Igla_AA_pod_East", _aapos, [], 0, "NONE"]; _aapod setdir (random 290);
  5. thanks mate. i tried this but it diddnt work _aadis = [200,500,1000,2000,3000,4000,5000] call BIS_fnc_selectRandom; _aapod = createVehicle ["Igla_AA_pod_East", getMarkerPos "center", [], _aadis, "NONE"]; _aapod setDir random 290; _aapod addEventHandler["killed", { (_this select 0) spawn AALoop; }];
  6. cheers guys, So i done kylania's tip with shk_pos but still not working i think i done it wrong this is what i done highlighted in red [color="#FF0000"] _aadis = [200,500,1000,2000,3000,4000,5000] call BIS_fnc_selectRandom;[/color] _aapod = createVehicle ["Igla_AA_pod_East", getmarkerpos "center", [], 0, "NONE"]; _aapod setDir random 290; _dir = 290; [color="#FF0000"] _aapod setVehicleInit "_pos = [getMarkerPos "center", _aadis, random 359, false, [0, 0]] call SHK_pos;" processInitCommands; [/color] _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; hint "aa spawned";
  7. so i am debuging a heap of enemy aa emplacements my code works great i know they are all spawning in random spots but i just cant get a marker to spawn on them for debug reasons. i should add i get the debug AA hint ----- i get the debug AA start hint----- but i9 dont get the debug AA finished hint so it is stopping around the (createMarker [str round random 999999,position _enemyAA]) setMarkerType "dot"; this is my code the debug part is in red /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////// //////////////////////////////////// /////////////////////// Enemy AA Script For Operation HOG BY =Mason= ///////////////////////////////////// ////////////////////// ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// AALoop ={ sleep 5; [] spawn createAA; }; createAA ={ for "_i" from 0 to 15 do { _debug = true; //hint "new AA starting"; _grp2 = []; _grp = createGroup east; _spawn2 = getMarkerPos "center"; _offset2 = [200,500,1000,2000,3000,4000,5000] call BIS_fnc_selectRandom; _offset3 = random 100; _prec2 = random 100; _exp2 = "(1 - houses) * (1 - houses)"; _bestplace2 = selectBestPlaces [_spawn2,_offset2,_exp2,_prec2,1]; _spot4 = _bestplace2 select 0; _spot3 = _spot4 select 0; _safespawn2 = _spot3 findEmptyPosition [10, 75, "tank"]; _randomvehicle2 = ["Igla_AA_pod_East"] call BIS_fnc_selectRandom; _direction2 = random 359; _vehicleCreated =[_safespawn2, _direction2, _randomvehicle2, EAST] call BIS_fnc_spawnvehicle; _vehiclegroup = _vehicleCreated select 2;//group _gunner = _grp createUnit ["RU_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"]; _gunner assignAsGunner _aapod; _gunner moveInGunner _aapod; {_x setSkill ["aimingAccuracy",0.65]} forEach units _grp; {_x setSkill ["aimingShake",0.65]} forEach units _grp; {_x setSkill ["aimingSpeed",0.65]} forEach units _grp; {_x setSkill ["endurance",0.85]} forEach units _grp; {_x setSkill ["spotDistance",0.99]} forEach units _grp; {_x setSkill ["spotTime",0.85]} forEach units _grp; {_x setSkill ["courage",0.85]} forEach units _grp; {_x setSkill ["reloadSpeed",0.85]} forEach units _grp; {_x setSkill ["commanding",0.85]} forEach units _grp; {_x setSkill ["general",0.85]} forEach units _grp; [color="#FF0000"] if(_debug) then { hint "debug AA"; markerfollow = { _EnemyAA = _this select 0; while {alive _enemyAA} do { hint "debug aa start"; (createMarker [str round random 999999,position _x]) setMarkerType "dot"; } foreach _EnemyAA; sleep 0.1; hint "debug AA Finished"; }; _handle = [_gunner] spawn markerfollow; };[/color] }; }; ///////////////////////////////////////////////////////////////////////////////////////// if (isserver) then { [] spawn createAA; sleep 5; };
  8. cheers mate but still not woring this is what i done if(_debug) then { hint "debug AA"; markerfollow = { _EnemyAA = _this select 0; while {alive _enemyAA} do { hint "debug aa start"; _m = createMarker[str(_x),position _x]; str(_x) setMarkerType "dot"; } foreach _EnemyAA; sleep 200; hint "debug AA Finished"; }; _handle = [_gunner] spawn markerfollow; }; and if(_debug) then { hint "debug AA"; markerfollow = { _EnemyAA = _this select 0; while {alive _enemyAA} do { hint "debug aa start"; _m = createMarker[str(_x),position _x]; str(_x) setMarkerType "dot"; } foreach _EnemyAA; sleep 200; hint "debug AA Finished"; }; _handle = [_gunner] spawn markerfollow; };
  9. cool thanks mate the reason im asking is that 8 out of ten times my halo code will not give the calling player a open chute option i was thinking if i called it only by the player that it will fix this this is the halo code called by a flag pole addaction if (!isServer && (player != player)) then { waitUntil {player == player}; waitUntil {time > 10}; }; _pole = _this select 0; _caller = player; if (not Halo_Active) then { Haloed = false; Halo_Active = true; Halo_Wait = 300; hintSilent "Click on the map where you'd like to Parajump."; openMap [true,false]; onMapSingleClick "player setPos _pos; [player, 1000] exec 'ca\air2\halo\data\Scripts\HALO_init.sqs';Haloed = true;hint 'Don''t forget to open your chute!'"; waitUntil {Haloed}; onMapSingleClick ""; openMap [false,false]; nul = [] execVM "HOG_scripts\Halo\Altimeter.sqf"; while {Halo_Wait > 0} do { Halo_Wait = Halo_Wait - 1; sleep 1; }; Halo_Active = false; } else { hint format ["You will have to wait %1 seconds for it to be available!!",Halo_Wait]; };
  10. So wondering if someone would be so kind to help me understand the correct use of if isserver and if isdedicated Explanation 1 i have this script but i only want it to run on the players pc not the dedi so do i use server or dedicated if (!isServer && (player != player)) then { waitUntil {player == player}; waitUntil {time > 10}; }; if (not Halo_Active) then { Haloed = false; Halo_Active = true; Halo_Wait = 300; hintSilent "Click on the map where you'd like to Parajump."; openMap [true,false]; onMapSingleClick "player setPos _pos; [player, 1000] exec 'ca\air2\halo\data\Scripts\HALO_init.sqs';Haloed = true;hint 'Don''t forget to open your chute!'"; waitUntil {Haloed}; onMapSingleClick ""; openMap [false,false]; nul = [] execVM "HOG_scripts\Halo\Altimeter.sqf"; while {Halo_Wait > 0} do { Halo_Wait = Halo_Wait - 1; sleep 1; }; Halo_Active = false; } else { hint format ["You will have to wait %1 seconds for it to be available!!",Halo_Wait]; }; Also say i am spawning enemy do i use if isserver then { }; or if isdedicated then { }; this is the code /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////// //////////////////////////////////////////////////////////////////////// /////////////////////// Spawn Enemy Script For Operation HOG SOCOMD Command ///////////////////////////////////////////// EDITED 28/5/2012 ////// ////////////////////// ////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if isserver then { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ////////////////////////////////////// // ---------- Spawn Infantry ---------- ////////////////////////////////////// // ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// for "_i" from 0 to 4 do { _upsgrp1 = [1,getmarkerpos "taskarea",1,["taskarea","spawned","random","fortify","delete:",120]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF"; _upsgrp2 = [1,getmarkerpos "taskarea",1,["taskarea","spawned","random","delete:",120]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF"; sleep 0.3; }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ////////////////////////////////////// // ---------- Spawn Armour ---------- ////////////////////////////////////// // ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////// //FOCKERS Vehicle Spaced Spawn //[FOCK] Mikie J //////////////////////// for "_i" from 0 to 10 do { _grp2 = []; _spawn2 = getMarkerPos "taskarea"; _offset2 = [30,50,70,80,120,200,250] call BIS_fnc_selectRandom; _offset3 = random 100; _prec2 = random 100; _exp2 = "(1 - houses) * (1 - houses)"; _bestplace2 = selectBestPlaces [_spawn2,_offset2,_exp2,_prec2,1]; _spot4 = _bestplace2 select 0; _spot3 = _spot4 select 0; _safespawn2 = _spot3 findEmptyPosition [10, 75, "tank"]; _randomvehicle2 = ["T34_TK_EP1","BRDM2_ATGM_TK_EP1","LandRover_MG_TK_EP1","T72_TK_EP1","ZSU_TK_EP1"] call BIS_fnc_selectRandom; _direction2 = random 359; _vehicleCreated =[_safespawn2, _direction2, _randomvehicle2, EAST] call BIS_fnc_spawnvehicle; _vehiclegroup = _vehicleCreated select 2;//group [(units _vehiclegroup) select 0, "taskarea","spawned","nofollow","random","nowait","delete:",120] execVM "scripts\upsmon.sqf"; //[_vehiclegroup, "terrorHelpers"] spawn FOCK_fnc_VehiclePatrolMkr; }; [] spawn E_reinforce; };
  11. awsome cheers mate and yes the halo script is being called from a add action but say i have a normal script that say lets someone build something or whatever and i only want the person calling it to run the script how do i achieve this is there a certain if command or do i add nothing.
  12. most likely a stupid question but should the following code be wrapped in if isserver then { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////// //////////////////////////////////// /////////////////////// Task's Script For Operation HOG BY =Mason= 17-06-2012 ///////////////////////////////////// ////////////////////// ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if isserver then { sleep 10; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // ---------- Setup Marker ---------- // // // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// _Taskarea = createmarker ["taskarea",getMarkerPos "task1"]; _Taskarea setmarkershape "ELLIPSE"; _Taskarea setmarkersize [400,400]; //"taskarea" setMarkerAlpha 0; /// unmark to not show sleep .5; _Taskarea1 = createmarker ["REIN",getMarkerPos "task1"]; _Taskarea1 setmarkershape "ELLIPSE"; _Taskarea1 setmarkersize [400,400]; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // ---------- Setup target ---------- // // // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// execVM "missions\setup\targets\objective1.sqf"; sleep .5; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // ---------- Spawn Enemy ---------- // // // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// execVM "missions\setup\Task_Enemy\task1_enemy.sqf"; sleep .5; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // ---------- Wait for Target To Be Destroyed ---------- // // // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// waitUntil{(Target1_active ==0) && (Target2_active ==0) && (Target3_active ==0) && (Target4_active ==0)}; ["task1","succeeded"] call SHK_Taskmaster_upd; sleep .5; //[] spawn Win_Points; sleep 20; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // ---------- Clean Up ---------- // // // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// execVM "missions\setup\endtask.sqf"; };
  13. thanks mate. ---------- Post added at 19:53 ---------- Previous post was at 19:48 ---------- works perfect just hope it makes the jet engage things ;)
  14. Ok so i have this code that works fine it spawns the enemy jet the jet patrols the waypoints BUT the enemy jet does not engage nothing u can follow it in a a10 all night if u want and it will not be enticed to attack you. Does any one know how i can solve this cheers. enemy jet code ---- the jet spawn part is in red JetDeathLoop ={ sleep 5; [] spawn JetMapPatrol; }; JetMapPatrol ={ [color="#FF0000"]//hint "spawn Su 34"; _debug = false; _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 JetDeathLoop; }]; //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; _waypoint0 = _grp addWaypoint [getmarkerpos "eair1",0]; _waypoint0 setWaypointType "Move"; _waypoint0 setWaypointBehaviour "COMBAT"; _waypoint0 setwaypointcombatmode "RED"; _waypoint0 setWaypointSpeed "NORMAL"; _waypoint1 = _grp addWaypoint [getmarkerpos "eair2",0]; _waypoint1 setWaypointType "Move"; _waypoint1 setWaypointBehaviour "UNCHANGED"; _waypoint1 setwaypointcombatmode "NO CHANGE"; _waypoint1 setWaypointSpeed "UNCHANGED"; _waypoint2 = _grp addWaypoint [getmarkerpos "eair3",0]; _waypoint2 setWaypointType "Move"; _waypoint2 setWaypointBehaviour "UNCHANGED"; _waypoint2 setwaypointcombatmode "NO CHANGE"; _waypoint2 setWaypointSpeed "UNCHANGED"; _waypoint3 = _grp addWaypoint [getmarkerpos "eair4",0]; _waypoint3 setWaypointType "Move"; _waypoint3 setWaypointBehaviour "UNCHANGED"; _waypoint3 setwaypointcombatmode "NO CHANGE"; _waypoint3 setWaypointSpeed "UNCHANGED"; _waypoint4 = _grp addWaypoint [getmarkerpos "eair5",0]; _waypoint4 setWaypointType "Move"; _waypoint4 setWaypointBehaviour "UNCHANGED"; _waypoint4 setwaypointcombatmode "NO CHANGE"; _waypoint4 setWaypointSpeed "UNCHANGED"; _waypoint5 = _grp addWaypoint [getmarkerpos "eair6",0]; _waypoint5 setWaypointType "Move"; _waypoint5 setWaypointBehaviour "UNCHANGED"; _waypoint5 setwaypointcombatmode "NO CHANGE"; _waypoint5 setWaypointSpeed "UNCHANGED"; _waypoint6 = _grp addWaypoint [getmarkerpos "eair7",0]; _waypoint6 setWaypointType "Cycle"; _waypoint6 setWaypointBehaviour "UNCHANGED"; _waypoint6 setwaypointcombatmode "NO CHANGE"; _waypoint6 setWaypointSpeed "UNCHANGED"; [/color] ////////=====> now the debug code <==//////////////////////////////////////////////////////////////////////// if(_debug) then { hint "debug aircraft"; markerfollow = { _plane = _this select 0; while {alive _plane} do { "debugjet" setMarkerPos getPosATL _plane; sleep .5; }; }; _handle = [_a10] spawn markerfollow; }; }; ///////////////////////////////////////////////////////////////////////////////////////// if (isserver) then { [] spawn JetMapPatrol; sleep 5; };
  15. yeah mate, im also spawning all my men and tanks via script witch all works fine just this jet seems to be dumb i was thinking maybe adding this {_x setSkill ["aimingAccuracy",0.3]} forEach _grp; {_x setSkill ["aimingShake",0.3]} forEach _grp; {_x setSkill ["aimingSpeed",0.3]} forEach _grp; {_x setSkill ["endurance",0.85]} forEach _grp; {_x setSkill ["spotDistance",0.99]} forEach _grp; {_x setSkill ["spotTime",0.85]} forEach _grp; {_x setSkill ["courage",0.85]} forEach _grp; {_x setSkill ["reloadSpeed",0.85]} forEach _grp; {_x setSkill ["commanding",0.85]} forEach _grp; {_x setSkill ["general",0.85]} forEach _grp; but it seems i get this error {_x setSkill ["aimingAccuracy",0.3]} forEach _grp; {_x setSkill ["aimingSha> Error position: <forEach _grp; {_x setSkill ["aimingSha> Error foreach: Type Object, expected Array File C:\Users\natho\Documents\ArmA 2 Other Profiles\=Mason=\missions\Operation_HOG_v2_23.Chernarus\missions\setup\Task_Enemy\e_air.sqf, line 36 i think it means im using the wrong array at the end of the setskill code this is it in full _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 JetDeathLoop; }]; //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; {_x setSkill ["aimingAccuracy",0.3]} forEach _grp; {_x setSkill ["aimingShake",0.3]} forEach _grp; {_x setSkill ["aimingSpeed",0.3]} forEach _grp; {_x setSkill ["endurance",0.85]} forEach _grp; {_x setSkill ["spotDistance",0.99]} forEach _grp; {_x setSkill ["spotTime",0.85]} forEach _grp; {_x setSkill ["courage",0.85]} forEach _grp; {_x setSkill ["reloadSpeed",0.85]} forEach _grp; {_x setSkill ["commanding",0.85]} forEach _grp; {_x setSkill ["general",0.85]} forEach _grp;
  16. Thanks very much mate that works perfect ill definantly read that link your a champ
  17. righto so i got the marker moiving to the jets position on mission load but it doesnt follow the jet this is what ive done if(_debug) then { hint "debug aircraft"; "debugjet" setMarkerPos getPosATL (leader _grp); sleep 0.5; }; now the full code JetDeathLoop ={ sleep 5; [] spawn JetMapPatrol; }; JetMapPatrol ={ //hint "spawn a10"; [b][color="#FF0000"]_debug = true;[/color][/b] _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 JetDeathLoop; }]; //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 200; _wp2 = _grp addWaypoint [getPos eair2, 1]; [_grp, 1] setWaypointType "SAD"; [_grp, 1] setWaypointCompletionRadius 200; _wp3 = _grp addWaypoint [getPos eair3, 2]; [_grp, 2] setWaypointType "SAD"; [_grp, 2] setWaypointCompletionRadius 200; _wp4 = _grp addWaypoint [getPos eair4, 3]; _wp4 setWaypointType "CYCLE"; _wp4 setWaypointCompletionRadius 200; [b][color="#FF0000"] ////////=====> now the debug code <==//////////////////////////////////////////////////////////////////////// if(_debug) then { hint "debug aircraft"; "debugjet" setMarkerPos getPosATL (leader _grp); sleep 0.5; };[/color] [/b] }; ///////////////////////////////////////////////////////////////////////////////////////// private ["_debug","_grp","_a10","_dir","_speed","_pilot","_wp1","_wp2","_wp3","_wp4","_debum"]; if (isserver) then { // _debug = true; //hint "spawning jets"; [] spawn JetMapPatrol; sleep 5; }; any ideas
  18. this is the full code thanks for your help. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////// //////////////////////////////////// /////////////////////// Air Patrol Script For Operation HOG BY =Mason= ///////////////////////////////////// ////////////////////// ////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// JetDeathLoop ={ 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 JetDeathLoop; }]; //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 200; _wp2 = _grp addWaypoint [getPos eair2, 1]; [_grp, 1] setWaypointType "SAD"; [_grp, 1] setWaypointCompletionRadius 200; _wp3 = _grp addWaypoint [getPos eair3, 2]; [_grp, 2] setWaypointType "SAD"; [_grp, 2] setWaypointCompletionRadius 200; _wp4 = _grp addWaypoint [getPos eair4, 3]; _wp4 setWaypointType "CYCLE"; _wp4 setWaypointCompletionRadius 200; }; ///////////////////////////////////////////////////////////////////////////////////////// if (isserver) then { _debug = true; //hint "spawning jets"; [] spawn JetMapPatrol; sleep 5; ////////=====> now the debug code <==//////////////////////////////////////////////////////////////////////// if(_debug) then { hint "debug aircraft"; [] spawn { while {not isnull _grp} do { "debugjet" setMarkerPos getPosATL (leader _grp); sleep 0.5; }; }; }; };
  19. i stripped this out of a mission a while back a played around a bit with it any way to give a soldier the ability to build a sandbag wall just do the following in the editor name your unit i.e sgt in the editor create a trigger with Activation non and not present also Type None in trigger have Condition = alive sgt On Act = sgt execVM "config_sgt.sqf"; now config_sgt.sqf sgt exec "sgt_add_build_cover.sqf"; now sgt_add_build_cover.sqf if (alive sgt) then { _actionId = sgt addAction ["Build Cover", "build_cover.sqf", [], -1, false, true, "", "(_target == _this)"]; now build cover.sqf _manall = _this select 0; _idall = _this select 2; if (alive _manall) then { _manall removeAction _idall; _manall switchMove "AinvPknlMstpSlayWrflDnon_medic"; sleep 1.8; _manall switchMove "amovpknlmstpsraswrfldnon_gear"; _cover1 = "Land_BagFenceRound" createVehicle [0,0,0];//<=======this is the object class name that you whish to build _cover2 = "Land_BagFenceRound" createVehicle [0,0,0];//<=======this is the object class name that you whish to build _cover1 setDir ((direction _manall) -180); _cover1 setPosATL (_manall modelToWorld [0,1.4,((position _manall) select 2)]); _cover2 setDir ((direction _manall) -180); _cover2 setPosATL (_manall modelToWorld [0,1.4,((position _manall) select 2) -0.7]); //_cover1 setVehicleInit "this allowDamage false"; //_cover2 setVehicleInit "this allowDamage false"; //processInitCommands; //[] spawn L_Points; sleep .2; _manall addAction ["Build Cover", "build_cover.sqf", [], -1, false, true, "", "(_target == _this)"]; }; thats it now just repeat allsteps for every player unit on your mission just have them all point to the one build_cover.sqf file. you can also use a point system so players cant do it unless they have say 2 points then they lose the 2 points to use it just let me know if you need to know how
  20. sorry guys u are correct that was a earlier version of that code i forgot to delete my rpt file and start a new one the new one is Error in expression <r _a10; _pilot setskill 1; _wp1 = _grp addWaypoint [getPos eair1, 0]; [_grp, 0]> Error position: <addWaypoint [getPos eair1, 0]; [_grp, 0]> Error 0 elements provided, 3 expected File C:\Users\natho\Documents\ArmA 2 Other Profiles\=Mason=\missions\Operation_HOG_v2_23.Chernarus\missions\setup\Task_Enemy\e_air.sqf, line 32 Error in expression < = this; this setVehicleVarName ""%1""",_unitname]; processInitCommands; slee> that is the only error that refers to e_air.sqf would any 1 have a working bit of code to create a marker to follow the enemy plane for debug ---------- Post added at 22:17 ---------- Previous post was at 22:14 ---------- the actuall code i am trying now is if (isserver) then { _debug = true; ////////=====> now the debug code <==//////////////////////////////////////////////////////////////////////// if(_debug) then { hint "debug aircraft"; [] spawn { while {not isnull _grp} do { "debugjet" setMarkerPos getPosATL (leader _grp); sleep 0.5; }; }; }; }; ---------- Post added at 22:24 ---------- Previous post was at 22:17 ---------- Thanks mate appreciate that :D
  21. this is all i can find for this particular script Error in expression <ddWaypoint [getPos eair1, 0]; [_grp, 0] setWaypointType "SAD"; [_grp, 0] setWayp> Error position: <setWaypointType "SAD"; [_grp, 0] setWayp> Error Type Any, expected Group File C:\Users\natho\Documents\ArmA 2 Other Profiles\=Mason=\missions\Operation_HOG_v2_23.Chernarus\missions\setup\Task_Enemy\e_air.sqf, line 20 Error in expression < spawn JetMapPatrol; sleep 2; if(debug == true) then { { hint "debug aircraft";> Error position: <== true) then { { hint "debug aircraft";> Error ==: Type Bool, expected Number,String,Object,Side,Group,Text,Config entry,Display (dialog),Control,Team member,Task,Location File C:\Users\natho\Documents\ArmA 2 Other Profiles\=Mason=\missions\Operation_HOG_v2_23.Chernarus\missions\setup\Task_Enemy\e_air.sqf, line 62
  22. cheers mate but it does not seem to work still.
  23. So i have searched and found nothing on how you can create a paramater. So i was wondering if any 1 can give us a quick how to on creating a Paramter. My Paramater i need to create is to turn a rank script on or of for my mission the rank script ////////////////////////////////////////////////////////////////// // Function file for Armed Assault // [FOCK] Mikie J - adapted from earlier evo map - unknown author ////////////////////////////////////////////////////////////////// /////change score accordingly rankup1 = 75; //corporal rankup2 = 150; //sergeant rankup3 = 300; //lieutenant rankup4 = 500; //captain rankup5 = 700; //major rankup6 = 1000;//colonel ///////////////////////// if ! isdedicated then //not run on the dedicated server - client side { [] spawn // calls the below script used for a loop { waituntil {!isnull player}; for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { switch (true) do { _myguy = name player; _score = score player; _promo = rank player; case ((_score < rankup1) and (_promo != "PRIVATE")) : { hint format["Your rank is now %2",_myguy,"PRIVATE"]; aunit = player; arank = "PRIVATE"; player setUnitRank arank; publicVariable "aunit"; publicVariable "arank"; }; case (( _score < rankup2) and (_score >= rankup1) and (_promo != "CORPORAL")): { hint format["Your rank is now %2",_myguy,"CORPORAL"]; aunit = player; arank = "CORPORAL"; player setUnitRank arank; publicVariable "aunit"; publicVariable "arank"; }; case ((_score < rankup3) and (_score >= rankup2) and (_promo != "SERGEANT")) : { hint format["You can now use the C130J at base as your rank is now %2",_myguy,"SERGEANT"]; aunit = player; arank = "SERGEANT"; player setUnitRank arank; publicVariable "aunit"; publicVariable "arank"; }; case (_score < rankup4 and _score >= rankup3 and _promo != "LIEUTENANT") : { hint format["You can now use the F35B at base as Your rank is now %2",_myguy,"LIEUTENANT"]; aunit = player; arank = "LIEUTENANT"; player setUnitRank arank; publicVariable "aunit"; publicVariable "arank"; }; case (_score < rankup5 and _score >= rankup4 and _promo != "CAPTAIN") : { hint format["Your rank is now %2",_myguy,"CAPTAIN"]; aunit = player; arank = "CAPTAIN"; player setUnitRank arank; publicVariable "aunit"; publicVariable "arank"; }; case (_score < rankup6 and _score >= rankup5 and _promo != "MAJOR") : { hint format["You can now use Artillery guns and the A-10 at base as your rank is now %2",_myguy,"MAJOR"]; aunit = player; arank = "MAJOR"; player setUnitRank arank; publicVariable "aunit"; publicVariable "arank"; }; case (_score >= rankup6 and _promo != "COLONEL") : { hint format["You can now use the Apace at base as your rank is now %2",_myguy,"COLONEL"]; aunit = player; arank = "COLONEL"; player setUnitRank arank; publicVariable "aunit"; publicVariable "arank"; }; }; sleep 1.03; }; }; }; So how can i add a Paramter to this to turn it on or of Thanks in advance. ---------- Post added at 16:39 ---------- Previous post was at 16:12 ---------- So this is what i tried and it failed init.sqf [(paramsArray select 1), "false"] execvm "Rank\Rank_init.sqf"; description.ext class Params { class DayTime { //paramsArray[0] title = "Time Of Day"; values[] = {-6, 0, 8, 13}; texts[] = {"Morning", "Clear day", "Sundown", "Night"}; default = 0; }; [b] class Rank { // paramsArray[1] title = "Use The Rank System:"; values[] = {0,1}; texts[] = {"Off","ON"}; default = 1; };[/b] }; Rank_init.sqf" if isserver then { execVM "Rank\vehrank.sqf"; //vehilce ranking execVM "Rank\rankcaller.sqf"; // continually shows current rank - change for pic of rank execVM "Rank\Ranknew.sqf"; //ranking system };
  24. hogmason

    [FOCK]ers IED

    hell yeah Mikie well done mate ;)
  25. Sorry mate yeah i am doinf that i have this in my init if(isNil "paramsArray") then{ paramsArray = [ 0, // Time of Day 1000, // Revive 1, //Rank ]; }; i am also testing on a dedi
×