fwouedd
Member-
Content Count
4 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout fwouedd
-
Rank
Rookie
-
Thanks, no more explodings armored :)
-
Hi, i need some help. I use the lattest ARMA 3 dev build. I try : _WAG_POS01 = [getmarkerpos _WAG_MARKER01,[100,250],random 360,0,[1,250],Armored] call SHK_pos; and : _WAG_POS01 = [getmarkerpos _WAG_MARKER01,[100,250],random 360,0,[1,250],(typeof Armored)] call SHK_pos; Result : Error Undefined variable in expression: armored I have the same problem if i use heli and car, APC, MRAP. Any idea?
-
I need your help : my random mission randomly fail with a dedicated server.
fwouedd replied to fwouedd's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you Zenophon, I will study your advice, study your changes and, I hope, learn a lot. Thanks again. -
Hi. I am currently working on a infantry mission. On start, it should create or choose a random weather, choose a random marker to spawn objects, units, trigger and players. All is perfectly working in preview or if i host the game, but it's not the same on a dedicated server. So : Init : enableSaving [false, false]; waituntil {!isnil "bis_fnc_init"}; call compileFinal preprocessFileLineNumbers "Scripts\fwd_revive.sqf"; call compile preprocessfile "Scripts\shk_pos_init.sqf"; call compile preprocessfilelinenumbers "Scripts\shk_taskmaster.sqf"; _handle1 = [1,1,0] execVM "Scripts\fwd_debug.sqf"; waitUntil {sleep 0.5;ScriptDone _Handle1}; _handle2 = execVM "Scripts\fwd_randomstart_init.sqf"; waitUntil {sleep 0.5;ScriptDone _Handle2}; _handle3 = execVM "Scripts\fwd_randomtime_init.sqf"; waitUntil {sleep 0.5;ScriptDone _Handle3}; _handle4 = execVM "Scripts\fwd_randomstart.sqf"; waitUntil {sleep 0.5;ScriptDone _Handle4}; _handle5 = execVM "Scripts\fwd_randomtime.sqf"; waitUntil {sleep 0.5;ScriptDone _Handle5}; _handle6 = execVM "Scripts\fwd_wait.sqf"; waitUntil {sleep 0.5;ScriptDone _Handle6}; _handle7 = execVM "Scripts\OPFOR\fwd_OPFOR.sqf"; waitUntil {sleep 0.5;ScriptDone _Handle7}; handle8 = execVM "Scripts\fwd_objectives.sqf"; _handle1 : Scripts\fwd_debug.sqf fwd_trackunit = _this select 0; fwd_showmarker = _this select 1; fwd_debug = _this select 2; publicVariable "fwd_trackunit"; publicVariable "fwd_showmarker"; publicVariable "fwd_debug"; if ( fwd_debug == 1 ) then { hintC format ["Debug Mode running.\n - Unit tracker : %1\n - Marker tracker : %2",fwd_trackunit,fwd_showmarker]}; _handle2 : Scripts\fwd_randomstart_init.sqf if (isServer) then { _missionsector0 = ["Z1","Z2","Z3","Z4","Z5","Z6","Z7","Z8","Z9","Z10","Z11","Z12","Z13"]; _missionsector = _missionsector0 select floor(random count _missionsector0); Startpoint = getmarkerpos _missionsector; publicVariable "Startpoint"; _marker1 = createMarker ["S1", Startpoint]; "S1" setMarkerShape "ELLIPSE"; "S1" setMarkerBrush "Border"; "S1" setMarkerColor "Colorblue"; "S1" setMarkerSize [2500, 2500]; if ( fwd_showmarker == 1 ) then { "S1" setMarkerAlpha 1} else { "S1" setMarkerAlpha 0}; _marker2 = createMarker ["S2", Startpoint]; "S2" setMarkerShape "ELLIPSE"; "S2" setMarkerBrush "Border"; "S2" setMarkerColor "Colorblue"; "S2" setMarkerSize [1500, 1500]; if ( fwd_showmarker == 1 ) then { "S2" setMarkerAlpha 1} else { "S2" setMarkerAlpha 0}; _posSTART = ["S1",0,"S2"] call SHK_pos; _marker3 = createMarker ["S3",_posSTART]; "S3" setMarkerShape "ICON"; "S3" setmarkerSize [1,1]; "S3" setMarkerType "mil_dot"; if ( fwd_showmarker == 1 ) then { "S3" setMarkerAlpha 1} else { "S3" setMarkerAlpha 0}; _marker4 = createMarker ["C1", Startpoint]; "C1" setMarkerShape "ICON"; "C1" setmarkerSize [1,1]; "C1" setMarkerType "mil_dot"; if ( fwd_showmarker == 1 ) then { "C1" setMarkerAlpha 1} else { "C1" setMarkerAlpha 0}; _marker5 = createMarker ["M", Startpoint]; "M" setMarkerShape "ELLIPSE"; "M" setMarkerBrush "Border"; "M" setMarkerColor "ColorRed"; "M" setMarkerSize [1000, 1000]; if ( fwd_showmarker == 1 ) then { "M" setMarkerAlpha 1} else { "M" setMarkerAlpha 0}; _marker6 = createMarker ["M1", Startpoint]; "M1" setMarkerShape "RECTANGLE"; "M1" setMarkerBrush "BDiagonal"; "M1" setMarkerColor "ColorRed"; "M1" setMarkerDir ([ Startpoint , leader PlayerGrp ] call BIS_fnc_dirTo); "M1" setMarkerSize [1000, 1000]; "M1" setMarkerAlpha 0; if ( fwd_showmarker == 1 ) then { _marker6a = createMarker ["M1a", Startpoint];"M1a" setMarkerShape "RECTANGLE";"M1a" setMarkerBrush "BDiagonal";"M1a" setMarkerColor "ColorRed";"M1a" setMarkerDir ([ Startpoint , leader player ] call BIS_fnc_dirTo);"M1a" setMarkerSize [1000, 1000];"M1a" setMarkerAlpha 0.5}; _marker7 = createMarker ["M2", Startpoint]; "M2" setMarkerShape "RECTANGLE"; "M2" setMarkerBrush "BDiagonal"; "M2" setMarkerColor "ColorRed"; "M2" setMarkerDir ([ Startpoint , leader PlayerGrp] call BIS_fnc_dirTo); "M2" setMarkerSize [250, 250]; "M2" setMarkerAlpha 0; if ( fwd_showmarker == 1 ) then { _marker7a = createMarker ["M2a", Startpoint];"M2a" setMarkerShape "RECTANGLE";"M2a" setMarkerBrush "BDiagonal";"M2a" setMarkerColor "ColorRed";"M2a" setMarkerDir ([ Startpoint , leader player ] call BIS_fnc_dirTo);"M2a" setMarkerSize [250, 250];"M2a" setMarkerAlpha 1}; }; _handle3 : Scripts\fwd_randomtine_init.sqf if (isServer) then { mytime = round(random 24); myweather = 0.2 + ((round (random 5))/10); mywind1 = (round(random 60)) - 30; mywind2 = (round(random 60)) - 30; if ( myweather > 0.7) then { myfog = 0.2 - ((round(random 2))/(10)); } else { myfog= 0.01; }; if ( myweather > 0.5) then { myrain = myweather +((round(random 2))/(10)); } else { myrain= 0; }; fwdinitialWeather = (paramsArray select 0); switch (fwdinitialWeather) do { case 1: {fwdweather = 0;fwdrain = 0;fwdfog = 0;fwdwind1 = 1;fwdwind2 = 1;}; case 2: {fwdweather = .40;fwdrain = .40;fwdfog= 0;fwdwind1 = 2;fwdwind2 = 2;}; case 3: {fwdweather = .70;fwdrain = .70;fwdfog = .05;fwdwind1= 3;fwdwind2 = 3;}; case 4: {fwdweather = 1;fwdrain = 1;fwdfog = .05;fwdwind1 = 4;fwdwind2 = 4;}; case 5: {fwdweather = .75;fwdrain = .10;fwdfog = .30;fwdwind1 = 1;fwdwind2 = 1;}; case 6: {fwdweather = .85;fwdrain = .20;fwdfog = .50;fwdwind1= 0;fwdwind2 = 0;}; case 7: {fwdweather = myweather;fwdrain = myrain;fwdfog = myfog;fwdwind1 = mywind1;fwdwind2= mywind2;}; }; publicVariable "fwdweather"; publicVariable "fwdwind1"; publicVariable "fwdwind2"; publicVariable "fwdfog"; publicVariable "fwdrain"; fwdinitialhour = (paramsArray select 1); switch (fwdinitialhour) do { case 1: {fwdtime = 13;}; case 2: {fwdtime = 17;}; case 3: {fwdtime = 23;}; case 4: {fwdtime = 30;}; case 5: {fwdtime = 33;}; case 6: {fwdtime = mytime;}; }; publicVariable "fwdtime"; }; _handle4 : Scripts\fwd_randomstart;sqf waitUntil { !(isNull player) }; waitUntil { time > 0 }; player setPosATL getMarkerPos "S3"; player setDir ([ leader PlayerGrp , Startpoint ] call BIS_fnc_dirTo)}; _handle5 : Scripts\fwd_randomtime.sqf waitUntil {!isNil "fwdtime"}; skipTime fwdtime; 1 setOvercast fwdweather; 1 setFog fwdfog; _handle6 : Scripts\fwd_wait.sqf (without this script, the sky doesn't change, with it, my entire ramdom weather script run correctly.) skipTime 1; 1 setRain fwdrain; setWind [fwdwind1,fwdwind2,true]; _handle7 : Scripts\OPFOR\fwd_OPFOR.sqf if (isServer) then { // Unit 1 spawn settings; nul = [u1,"M1","Random","nofollow"] execVM "Scripts\fwd_ups.sqf"; if ( fwd_trackunit == 1 ) then { 0 = [] spawn { _Marker_U1 = createMarker ["Marker_U1",[0,0]]; "Marker_U1" setMarkerShape "ICON"; "Marker_U1" setmarkerSize [0.5,0.5]; "Marker_U1" setMarkerType "mil_dot"; "Marker_U1" setMarkerColor "ColorRed"; "Marker_U1" setMarkerText "U1"; while {not isnull U1} do {"Marker_U1" setmarkerpos getpos U1; sleep 0.5;}; }; }; // Unit 2 spawn settings; nul = [u2,"M1","Random","nofollow"] execVM "Scripts\fwd_ups.sqf"; if ( fwd_trackunit == 1 ) then { 0 = [] spawn { _Marker_U2 = createMarker ["Marker_U2",[0,0]]; "Marker_U2" setMarkerShape "ICON"; "Marker_U2" setmarkerSize [0.5,0.5]; "Marker_U2" setMarkerType "mil_dot"; "Marker_U2" setMarkerColor "ColorRed"; "Marker_U2" setMarkerText "U2"; while {not isnull U2} do {"Marker_U2" setmarkerpos getpos U2; sleep 0.5;}; }; }; // Unit 3 spawn settings; nul = [u3,"M2","Random","nofollow"] execVM "Scripts\fwd_ups.sqf"; if ( fwd_trackunit == 1 ) then { 0 = [] spawn { _Marker_U3 = createMarker ["Marker_U3",[0,0]]; "Marker_U3" setMarkerShape "ICON"; "Marker_U3" setmarkerSize [0.5,0.5]; "Marker_U3" setMarkerType "mil_dot"; "Marker_U3" setMarkerColor "ColorRed"; "Marker_U3" setMarkerText "U3"; while {not isnull U3} do {"Marker_U3" setmarkerpos getpos U3; sleep 0.5;}; }; }; if ( fwd_debug == 1 ) then { hintC "FWD_objectives : spawn ok"}; // Unit 4 spawn settings; nul = [u4,"M2","Random","nofollow"] execVM "Scripts\fwd_ups.sqf"; if ( fwd_trackunit == 1 ) then { 0 = [] spawn { _Marker_U4 = createMarker ["Marker_U4",[0,0]]; "Marker_U4" setMarkerShape "ICON"; "Marker_U4" setmarkerSize [0.5,0.5]; "Marker_U4" setMarkerType "mil_dot"; "Marker_U4" setMarkerColor "ColorRed"; "Marker_U4" setMarkerText "U4"; while {not isnull U4} do {"Marker_U4" setmarkerpos getpos U4; sleep 0.5;}; }; }; // Unit 5 spawn settings; _posU5 = [getmarkerpos "M1",[10,1000],random 360,0,[0,1000]] call SHK_pos; _MU5 = createMarker ["MU5", _posU5]; "MU5" setMarkerShape "ICON"; "MU5" setmarkerSize [1,1]; "MU5" setMarkerType "mil_dot"; "MU5" setMarkerText "U5"; if ( fwd_showmarker == 1 ) then { "MU5" setMarkerAlpha 0.5} else { "MU5" setMarkerAlpha 0}; U5 setpos _posU5; if ( fwd_trackunit == 1 ) then { 0 = [] spawn { _Marker_U5 = createMarker ["Marker_U5",[0,0]]; "Marker_U5" setMarkerShape "ICON"; "Marker_U5" setmarkerSize [0.5,0.5]; "Marker_U5" setMarkerType "mil_dot"; "Marker_U5" setMarkerColor "ColorRed"; "Marker_U5" setMarkerText "U5"; while {not isnull U5} do {"Marker_U5" setmarkerpos getpos U5; sleep 0.5;}; }; 0 = [u5] execVM "Scripts\OPFOR\fwd_OPFORintercept.sqf"; }; // Unit 6 spawn settings; _posU6 = [getmarkerpos "M1",[10,1000],random 360,0,[0,1000]] call SHK_pos; _MU6 = createMarker ["MU6", _posU6]; "MU6" setMarkerShape "ICON"; "MU6" setmarkerSize [1,1]; "MU6" setMarkerType "mil_dot"; "MU6" setMarkerText "U6"; if ( fwd_showmarker == 1 ) then { "MU6" setMarkerAlpha 0.5} else { "MU6" setMarkerAlpha 0}; U6 setpos _posU6; if ( fwd_trackunit == 1 ) then { 0 = [] spawn { _Marker_U6 = createMarker ["Marker_U6",[0,0]]; "Marker_U6" setMarkerShape "ICON"; "Marker_U6" setmarkerSize [0.5,0.5]; "Marker_U6" setMarkerType "mil_dot"; "Marker_U6" setMarkerColor "ColorRed"; "Marker_U6" setMarkerText "U6"; while {not isnull U6} do {"Marker_U6" setmarkerpos getpos U6; sleep 0.5;}; }; 0 = [u6] execVM "Scripts\OPFOR\fwd_OPFORintercept2.sqf"; }; // Vehicle 1 spawn settings; _posV1 = [getmarkerpos "M1",[10,1000],random 360,0,[1,1000]] call SHK_pos; _MV1 = createMarker ["MV1", _posV1]; "MV1" setMarkerShape "ICON"; "MV1" setmarkerSize [1,1]; "MV1" setMarkerType "mil_dot"; "MV1" setMarkerText "V1"; if ( fwd_showmarker == 1 ) then { "MV1" setMarkerAlpha 0.5} else { "MV1" setMarkerAlpha 0}; V1 setpos _posV1; nul = [V1,"M1","nofollow"] execVM "Scripts\fwd_ups.sqf"; if ( fwd_trackunit == 1 ) then { 0 = [] spawn { _Marker_V1 = createMarker ["Marker_V1",[0,0]]; "Marker_V1" setMarkerShape "ICON"; "Marker_V1" setmarkerSize [0.5,0.5]; "Marker_V1" setMarkerType "mil_dot"; "Marker_V1" setMarkerColor "ColorRed"; "Marker_V1" setMarkerText "V1"; while {not isnull V1} do {"Marker_V1" setmarkerpos getpos V1; sleep 0.5;}; }; }; // Vehicle 2 spawn settings; _posV2 = [getmarkerpos "M1",[10,1000],random 360,0,[1,1000]] call SHK_pos; _MV2 = createMarker ["MV2", _posV2]; "MV2" setMarkerShape "ICON"; "MV2" setmarkerSize [1,1]; "MV2" setMarkerType "mil_dot"; "MV2" setMarkerText "V2"; if ( fwd_showmarker == 1 ) then { "MV2" setMarkerAlpha 0.5} else { "MV2" setMarkerAlpha 0}; V2 setpos _posV2; nul = [V2,"M1","nofollow"] execVM "Scripts\fwd_ups.sqf"; if ( fwd_trackunit == 1 ) then { 0 = [] spawn { _Marker_V2 = createMarker ["Marker_V2",[0,0]]; "Marker_V2" setMarkerShape "ICON"; "Marker_V2" setmarkerSize [0.5,0.5]; "Marker_V2" setMarkerType "mil_dot"; "Marker_V2" setMarkerColor "ColorRed"; "Marker_V2" setMarkerText "V2"; while {not isnull V2} do {"Marker_V2" setmarkerpos getpos V2; sleep 0.5;}; }; }; // Empty game logic spawn settings + activate fillhouse; GL1 setpos getmarkerpos "M1"; nul = [GL1,2,false,1,15,250,0.3,nil,nil,nil] execVM "Scripts\lv_fillHouse.sqf"; }; _handle8 : Scripts\fwd_objectives.sqf sleep 20; if ( fwd_debug == 1 ) then { hintC "FWD_objectives : launching"}; _marker0 = createMarker ["O1", Startpoint]; "O1" setMarkerShape "ICON"; "O1" setmarkerSize [1,1]; "O1" setMarkerType "mil_objective"; "O1" setMarkerColor "ColorBlack"; "O1" setMarkerAlpha 1; "O1" setMarkerText "Neutralize OPFOR"; _marker1 = createMarker ["O1a", Startpoint]; "O1a" setMarkerShape "ELLIPSE"; "O1a" setMarkerBrush "BDiagonal"; "O1a" setMarkerColor "ColorOPFOR"; "O1a" setMarkerSize [1000, 1000]; if ( fwd_showmarker == 1 ) then { "O1a" setMarkerAlpha 0} else { "O1a" setMarkerAlpha 1}; sleep 2; if ( fwd_debug == 1 ) then { hintC "FWD_objectives launched"}; sleep 2; ["Task1","Strike : Neutralize OPFOR.","Combat Operation : Seize the Area. Neutralize OPFOR."] call SHK_Taskmaster_add; if ( fwd_debug == 1 ) then { random1 = round(random 11);} else { random1 = round(random 100);}; if (random1 < 11) then {0 = [] execVM "Scripts\OPFOR\FWD_Airpatrol.sqf";} else {if ( fwd_debug == 1 ) then { hintC "FWD_Airpatrol : not launched"}}; sleep 15; _trgO1 = createTrigger ["EmptyDetector",Startpoint]; _trgO1 setTriggerArea [500,500,0,false]; _trgO1 setTriggerActivation ["EAST","NOT PRESENT",false]; _trgO1 setTriggerStatements ["this", "['Task1','succeeded'] call SHK_Taskmaster_upd", "hint ''"]; _trgO2 = createTrigger ["EmptyDetector",Startpoint]; _trgO2 setTriggerArea [500,500,0,false]; _trgO2 setTriggerActivation ["EAST","NOT PRESENT",false]; _trgO2 setTriggerStatements ["this", "hint ''", "hint ''"]; _trgO2 setTriggerTimeout [30, 30, 30, false ]; _trgO2 setTriggerType "END1"; Or download here (Mega.co.nz). Sometimes, players stay in pre-setpos position, sometimes, the entire Scripts\OPFOR\fwd_OPFOR.sqf is not working, but the objectives one is launched and the end trigger is activated after the sleep delay. I think it's a bad synchronisation between host and players, but i'm lost. Do you have any solutions or idea to optimize this or to make it functionnal on a dedicated server? Do you know how i can use the startLoadingScreen / endLoadingScreen with my init.sqf on a dedicated server? Thank you. (Oh, i forget. Thank you Farooqaaa, Shuko, Kronzky and spunFIN. Your scripts are awesome.)