mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
Fixed stuff
Removed execVM. Made it better to use for .pbo filing etc. Fixed other things too.
This commit is contained in:
parent
cf4890cc14
commit
158bc9ea68
31
DMS_init.sqf
Normal file
31
DMS_init.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
// Loads compiles
|
||||
// Made by Defent for Defents Mission System
|
||||
// And for Numenadayz.com
|
||||
|
||||
if(isServer) then {
|
||||
|
||||
// compilation list
|
||||
DMS_findSafePos = compileFinal preprocessFileLineNumbers "scripts\DMS_findSafePos.sqf";
|
||||
DMS_createBox = compileFinal preprocessFileLineNumbers "crates\DMS_CreateBox.sqf";
|
||||
DMS_CreateMarker = compileFinal preprocessFileLineNumbers "scripts\DMS_CreateMarker.sqf";
|
||||
DMS_spawnAI = compileFinal preprocessFileLineNumbers "scripts\DMS_spawnAI.sqf";
|
||||
DMS_selectMission = compileFinal preprocessFileLineNumbers "scripts\DMS_selectMission.sqf";
|
||||
DMS_CleanUp = compileFinal preprocessFileLineNumbers "scripts\DMS_CleanUp.sqf";
|
||||
DMS_Config = compileFinal preprocessFileLineNumbers "scripts\DMS_Config.__sqf2str";
|
||||
|
||||
|
||||
|
||||
// not fully loaded yet
|
||||
DMS_Loaded = false;
|
||||
|
||||
call DMS_Config;
|
||||
|
||||
waitUntil {DMS_Loaded};
|
||||
|
||||
call DMS_selectMission;
|
||||
|
||||
|
||||
diag_log "DMS :: Functions loaded - starting the rest of the script.";
|
||||
|
||||
|
||||
};
|
@ -20,7 +20,7 @@ GlobalHint = [0,_misText];
|
||||
publicVariable "GlobalHint";
|
||||
|
||||
// Spawn Marker
|
||||
[_pos,_missname] execVM "mission\scripts\DMS_CreateMarker.sqf";
|
||||
[_pos,_missname] execVM "scripts\DMS_CreateMarker.sqf";
|
||||
|
||||
// Spawn Box
|
||||
_crate = createVehicle ["Box_NATO_AmmoOrd_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||
@ -57,4 +57,4 @@ publicVariable "GlobalHint";
|
||||
|
||||
sleep 150;
|
||||
|
||||
[] execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
CALL DMS_selectMission.sqf;
|
||||
|
@ -25,7 +25,7 @@ publicVariable "GlobalHint";
|
||||
|
||||
|
||||
// Spawn Marker
|
||||
[_pos,_missname] execVM "mission\scripts\DMS_CreateMarker.sqf";
|
||||
[_pos,_missname] execVM "scripts\DMS_CreateMarker.sqf";
|
||||
|
||||
// Spawn Box
|
||||
_crate = createVehicle ["Box_NATO_AmmoOrd_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||
@ -61,5 +61,5 @@ publicVariable "GlobalHint";
|
||||
|
||||
sleep 150;
|
||||
|
||||
[] execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
CALL DMS_selectMission.sqf;
|
||||
|
||||
|
@ -24,7 +24,7 @@ GlobalHint = [0,_misText];
|
||||
publicVariable "GlobalHint";
|
||||
|
||||
// Spawn Marker
|
||||
[_pos,_missname] execVM "mission\scripts\DMS_CreateMarker.sqf";
|
||||
[_pos,_missname] execVM "scripts\DMS_CreateMarker.sqf";
|
||||
|
||||
// Spawn Box
|
||||
_crate = createVehicle ["Box_NATO_AmmoOrd_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||
@ -59,4 +59,4 @@ publicVariable "GlobalHint";
|
||||
|
||||
sleep 150;
|
||||
|
||||
[] execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
CALL DMS_selectMission.sqf;
|
||||
|
@ -24,7 +24,7 @@ GlobalHint = [0,_misText];
|
||||
publicVariable "GlobalHint";
|
||||
|
||||
// Spawn Marker
|
||||
[_pos,_missname] execVM "mission\scripts\DMS_CreateMarker.sqf";
|
||||
[_pos,_missname] execVM "scripts\DMS_CreateMarker.sqf";
|
||||
|
||||
// Spawn Box
|
||||
_crate = createVehicle ["Box_NATO_AmmoOrd_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||
@ -60,4 +60,4 @@ publicVariable "GlobalHint";
|
||||
|
||||
sleep 150;
|
||||
|
||||
[] execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
CALL DMS_selectMission.sqf;
|
@ -25,7 +25,7 @@ publicVariable "GlobalHint";
|
||||
|
||||
|
||||
// Spawn Marker
|
||||
[_pos,_missname] execVM "mission\scripts\DMS_CreateMarker.sqf";
|
||||
[_pos,_missname] execVM "scripts\DMS_CreateMarker.sqf";
|
||||
|
||||
// Spawn Box
|
||||
_crate = createVehicle ["Box_NATO_AmmoOrd_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||
@ -59,5 +59,5 @@ publicVariable "GlobalHint";
|
||||
|
||||
sleep 150;
|
||||
|
||||
[] execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
CALL DMS_selectMission.sqf;
|
||||
|
||||
|
@ -24,7 +24,7 @@ publicVariable "GlobalHint";
|
||||
|
||||
|
||||
// Spawn Marker
|
||||
[_pos,_missname] execVM "mission\scripts\DMS_CreateMarker.sqf";
|
||||
[_pos,_missname] execVM "scripts\DMS_CreateMarker.sqf";
|
||||
|
||||
// Spawn Box
|
||||
_crate = createVehicle ["Box_NATO_AmmoOrd_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||
@ -61,4 +61,4 @@ publicVariable "GlobalHint";
|
||||
|
||||
sleep 150;
|
||||
|
||||
[] execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
CALL DMS_selectMission.sqf;
|
||||
|
@ -24,7 +24,7 @@ GlobalHint = [0,_misText];
|
||||
publicVariable "GlobalHint";
|
||||
|
||||
// Spawn Marker
|
||||
[_pos,_missname] execVM "mission\scripts\DMS_CreateMarker.sqf";
|
||||
[_pos,_missname] execVM "scripts\DMS_CreateMarker.sqf";
|
||||
|
||||
// Spawn Box
|
||||
_crate = createVehicle ["Box_NATO_AmmoOrd_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||
@ -61,4 +61,4 @@ publicVariable "GlobalHint";
|
||||
|
||||
sleep 150;
|
||||
|
||||
[] execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
CALL DMS_selectMission.sqf;
|
||||
|
@ -25,7 +25,7 @@ GlobalHint = [0,_misText];
|
||||
publicVariable "GlobalHint";
|
||||
|
||||
// Spawn Marker
|
||||
[_pos,_missname] execVM "mission\scripts\DMS_CreateMarker.sqf";
|
||||
[_pos,_missname] execVM "scripts\DMS_CreateMarker.sqf";
|
||||
|
||||
// Spawn Box
|
||||
_crate = createVehicle ["Box_NATO_AmmoOrd_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||
@ -60,5 +60,5 @@ publicVariable "GlobalHint";
|
||||
|
||||
sleep 150;
|
||||
|
||||
[] execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
CALL DMS_selectMission.sqf;
|
||||
|
||||
|
@ -25,7 +25,7 @@ publicVariable "GlobalHint";
|
||||
|
||||
|
||||
// Spawn Marker
|
||||
[_pos,_missname] execVM "mission\scripts\DMS_CreateMarker.sqf";
|
||||
[_pos,_missname] execVM "scripts\DMS_CreateMarker.sqf";
|
||||
|
||||
// Spawn Box
|
||||
_crate = createVehicle ["Box_NATO_AmmoOrd_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||
@ -60,5 +60,5 @@ publicVariable "GlobalHint";
|
||||
|
||||
sleep 150;
|
||||
|
||||
[] execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
CALL DMS_selectMission.sqf;
|
||||
|
||||
|
@ -24,7 +24,7 @@ GlobalHint = [0,_misText];
|
||||
publicVariable "GlobalHint";
|
||||
|
||||
// Spawn Marker
|
||||
[_pos,_missname] execVM "mission\scripts\DMS_CreateMarker.sqf";
|
||||
[_pos,_missname] execVM "scripts\DMS_CreateMarker.sqf";
|
||||
|
||||
// Spawn Box
|
||||
_crate = createVehicle ["Box_NATO_AmmoOrd_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"];
|
||||
@ -58,4 +58,4 @@ publicVariable "GlobalHint";
|
||||
|
||||
sleep 150;
|
||||
|
||||
[] execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
CALL DMS_selectMission.sqf;
|
@ -1,14 +1,16 @@
|
||||
if(isServer) then {
|
||||
diag_log "DMS :: Config starting to load..";
|
||||
|
||||
//Settings
|
||||
DMS_UseMissions = true;
|
||||
//DMS_DetectNearWater = true;
|
||||
|
||||
// Timers in seconds
|
||||
//DMS_MissionMin = 60;
|
||||
//DMS_MissionMax = 120;
|
||||
|
||||
// Finalize
|
||||
DMS_Loaded = true;
|
||||
DMS_Config = {
|
||||
if(isServer) then {
|
||||
diag_log "DMS :: Config starting to load..";
|
||||
|
||||
//Settings
|
||||
DMS_UseMissions = true;
|
||||
//DMS_DetectNearWater = true;
|
||||
|
||||
// Timers in seconds
|
||||
//DMS_MissionMin = 60;
|
||||
//DMS_MissionMax = 120;
|
||||
|
||||
// Finalize
|
||||
DMS_Loaded = true;
|
||||
};
|
||||
};
|
@ -1,14 +1,16 @@
|
||||
private["_mark","_name"];
|
||||
DMS_Cords = _this select 0;
|
||||
DMS_MainName = _this select 1;
|
||||
DMS_CreateMarker = {
|
||||
private["_mark","_name"];
|
||||
DMS_Cords = _this select 0;
|
||||
DMS_MainName = _this select 1;
|
||||
|
||||
_mark = createMarker ["DMS_MainMarker", DMS_Cords];
|
||||
"DMS_MainMarker" setMarkerColor "ColorRed";
|
||||
"DMS_MainMarker" setMarkerShape "ELLIPSE";
|
||||
"DMS_MainMarker" setMarkerBrush "Grid";
|
||||
"DMS_MainMarker" setMarkerSize [150,150];
|
||||
_mark = createMarker ["DMS_MainMarker", DMS_Cords];
|
||||
"DMS_MainMarker" setMarkerColor "ColorRed";
|
||||
"DMS_MainMarker" setMarkerShape "ELLIPSE";
|
||||
"DMS_MainMarker" setMarkerBrush "Grid";
|
||||
"DMS_MainMarker" setMarkerSize [150,150];
|
||||
|
||||
_name = createMarker ["DMS_MainDot", DMS_Cords];
|
||||
"DMS_MainDot" setMarkerColor "ColorBlack";
|
||||
"DMS_MainDot" setMarkerType "mil_dot";
|
||||
"DMS_MainDot" setMarkerText DMS_MainName;
|
||||
_name = createMarker ["DMS_MainDot", DMS_Cords];
|
||||
"DMS_MainDot" setMarkerColor "ColorBlack";
|
||||
"DMS_MainDot" setMarkerType "mil_dot";
|
||||
"DMS_MainDot" setMarkerText DMS_MainName;
|
||||
};
|
@ -1,32 +1,33 @@
|
||||
if(isServer) then {
|
||||
private ["_pos","_centerPos","_fetchPos"];
|
||||
DMS_findSafePos = {
|
||||
if(isServer) then {
|
||||
private ["_pos","_centerPos","_fetchPos"];
|
||||
|
||||
//_centerPos = [getMarkerPos "center",4000,20000,10,0,25,0];
|
||||
_centerPos = [getMarkerPos "center",2000,4000,10,0,25,0];
|
||||
|
||||
_fetchPos = false;
|
||||
|
||||
_int = 1;
|
||||
|
||||
|
||||
while {!_fetchPos} do {
|
||||
|
||||
sleep 2;
|
||||
//_centerPos = [getMarkerPos "center",4000,20000,10,0,25,0];
|
||||
_centerPos = [getMarkerPos "center",2000,4000,10,0,25,0];
|
||||
|
||||
_pos = _centerPos call BIS_fnc_findSafePos;
|
||||
_int = _int + 1;
|
||||
_fetchPos = true;
|
||||
|
||||
if (_fetchPos) then {
|
||||
diag_log format ["DMS :: Found valid position at: (%1) in (%2) tries!",_pos,_int];
|
||||
};
|
||||
_fetchPos = false;
|
||||
|
||||
_int = 1;
|
||||
|
||||
|
||||
while {!_fetchPos} do {
|
||||
|
||||
sleep 2;
|
||||
|
||||
_pos = _centerPos call BIS_fnc_findSafePos;
|
||||
_int = _int + 1;
|
||||
_fetchPos = true;
|
||||
|
||||
if (_fetchPos) then {
|
||||
diag_log format ["DMS :: Found valid position at: (%1) in (%2) tries!",_pos,_int];
|
||||
};
|
||||
|
||||
// more if exceptions to come
|
||||
|
||||
// water if exception to be added above
|
||||
|
||||
// more if exceptions to come
|
||||
|
||||
// water if exception to be added above
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
@ -1,23 +1,25 @@
|
||||
private ["_sleepTime","_run","_countArray","_randomMiss","_missVar","_minTime","_maxTime","_missionFnc","_MainArray"];
|
||||
// First we add the array of missions
|
||||
_MainArray = ["MM1","MM2","MM3","MM4","MM5","MM6","MM7","MM8","MM9","MM10"];
|
||||
//DMS_SideArray = ["SM1","SM2"];
|
||||
/*
|
||||
_minTime = 1*600; //1 sec
|
||||
_maxTime = 2*600; //4 sec
|
||||
*/
|
||||
_minTime = 1*5; //1 sec
|
||||
_maxTime = 2*10; //4 sec
|
||||
DMS_SelectMission = {
|
||||
private ["_sleepTime","_run","_countArray","_randomMiss","_missVar","_minTime","_maxTime","_missionFnc","_MainArray"];
|
||||
// First we add the array of missions
|
||||
_MainArray = ["MM1","MM2","MM3","MM4","MM5","MM6","MM7","MM8","MM9","MM10"];
|
||||
//DMS_SideArray = ["SM1","SM2"];
|
||||
/*
|
||||
_minTime = 1*600; //1 sec
|
||||
_maxTime = 2*600; //4 sec
|
||||
*/
|
||||
_minTime = 1*5; //1 sec
|
||||
_maxTime = 2*10; //4 sec
|
||||
|
||||
|
||||
_sleepTime = (random (_maxTime - _minTime)) + _minTime;
|
||||
sleep _sleepTime;
|
||||
_sleepTime = (random (_maxTime - _minTime)) + _minTime;
|
||||
sleep _sleepTime;
|
||||
|
||||
_countArray = count _MainArray;
|
||||
_slct = floor (random _countArray);
|
||||
_missVar = _MainArray select _slct;
|
||||
_countArray = count _MainArray;
|
||||
_slct = floor (random _countArray);
|
||||
_missVar = _MainArray select _slct;
|
||||
|
||||
// Help from secret skype group.
|
||||
call compile preprocessfilelinenumbers format["mission\missions\%1.sqf",_missVar];
|
||||
|
||||
[] execVM format ["mission\missions\%1.sqf",_missVar];
|
||||
|
||||
//DMS_MissionRunning = 1;
|
||||
//DMS_MissionRunning = 1;
|
||||
};
|
@ -1,28 +0,0 @@
|
||||
// Loads compiles
|
||||
// Made by Defent for Defents Mission System
|
||||
// And for Numenadayz.com
|
||||
|
||||
if(isServer) then {
|
||||
|
||||
// compilation list
|
||||
DMS_findSafePos = compile preprocessFileLineNumbers "mission\scripts\DMS_findSafePos.sqf";
|
||||
DMS_createBox = compile preprocessFileLineNumbers "mission\crates\DMS_CreateBox.sqf";
|
||||
DMS_CreateMarker = compile preprocessFileLineNumbers "mission\scripts\DMS_CreateMarker.sqf";
|
||||
DMS_spawnAI = compile preprocessFileLineNumbers "mission\scripts\DMS_spawnAI.sqf";
|
||||
DMS_selectMission = compile preprocessFileLineNumbers "mission\scripts\DMS_selectMission.sqf";
|
||||
DMS_CleanUp = compile preprocessFileLineNumbers "mission\scripts\DMS_CleanUp.sqf";
|
||||
|
||||
|
||||
// not fully loaded yet
|
||||
DMS_Loaded = false;
|
||||
|
||||
execVM "mission\scripts\DMS_Config.sqf";
|
||||
waitUntil {DMS_Loaded};
|
||||
|
||||
execVM "mission\scripts\DMS_selectMission.sqf";
|
||||
|
||||
|
||||
diag_log "DMS :: Functions loaded - starting the rest of the script.";
|
||||
|
||||
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user