diff --git a/Tools/Directions.txt b/Tools/Directions.txt index 2d6823f..3a1eb26 100644 --- a/Tools/Directions.txt +++ b/Tools/Directions.txt @@ -18,14 +18,17 @@ Now, copy the sqf files from the tool folders into your mission folder. 'Play' the mission. Tools will be available through the action menu. -For static missions, just scrolll through the options with your mouse wheel and select the option to "". +For static missions, just scrolll through the options with your mouse wheel and select the option to "Add Static Mission Configuration to Clipboard". The mission configurations will be copied to the clipboard. Alt-Tab out and open your favorite text editor, then paste the output into a new file. You are now ready to modify the static mission template by pasting in the information about markers and various units. -Note that you will have to defin a few variables like _crateLoot and_lootCounts. +Note that you will have to define a few variables like _crateLoot and_lootCounts. Any other variables you wish to adjust in the template can be modified at this time. +////////////////// +Dynamic Missions +///////////////// For dynamic missions, the steps are similar but a bit more is involved. @@ -33,10 +36,12 @@ First, configure yoru mission as above. Hit Play. Set a mission center which is used to calculate the relative position of objects. -You can define it by placing a traffic cone with a light on it then selecting the action menu choice to use it a the center OR -by moving to the spot you want to be the center and selecting the appropriate option. -Next just select the menu option you want for the mode in which configs are exported. There are two possible methods to export configurations -the first dumps everything into a single list of objects. +You can define it by placing a traffic cone with a light on it at the center point of your mission then selecting the action menu choice to use it a the center +OR +by moving to the spot you want to be the center and selecting the appropriate option with your mouse wheel. +Next just select the menu option you want for the mode in which configs are exported. +There are two possible methods to export configurations. +The first dumps everything into a single list of objects. The second pre-configures the definitions used in the mission file. The output is copied to the clipboard as above. Once the script is done just paste ito you script editor and merge that content with a mission template. @@ -50,4 +55,4 @@ Variables used are defined in init.sqf ////////////// Limitations ///////////// -For some reason, at this time, the Z coordinate of objects is corrupted during export of dynamic missions. + diff --git a/Tools/centerAtPlayerPos.sqf b/Tools/centerAtPlayerPos.sqf index 99640d3..5e608ea 100644 --- a/Tools/centerAtPlayerPos.sqf +++ b/Tools/centerAtPlayerPos.sqf @@ -1,3 +1,3 @@ -CENTER = getPos player; +CENTER = getPosASL player; systemChat format["Center set to %1",CENTER]; \ No newline at end of file diff --git a/Tools/pullAllRelativeUnclassified.sqf b/Tools/pullAllRelativeUnclassified.sqf index c0c657b..a81b582 100644 --- a/Tools/pullAllRelativeUnclassified.sqf +++ b/Tools/pullAllRelativeUnclassified.sqf @@ -4,7 +4,7 @@ _obj = []; _cb = ""; _mo = allMissionObjects "All"; { - _line = format["[%1,%2,%3]",typeOf _x, (CENTER vectorDiff (getPosASL _x)),getDir _x]; + _line = format["[%1,%2,%3]",typeOf _x, ((getPosASL _x) vectorDiff CENTER),getDir _x]; // (CENTER vectorDiff (getPosATL _x)),getDir _x]; systemChat format["%1",_line]; _obj pushBack _line; _cb = _cb + format["%1,%2",_line,endl]; diff --git a/Tools/pullRelativeclassified.sqf b/Tools/pullRelativeclassified.sqf index 47c1516..0cd8f2c 100644 --- a/Tools/pullRelativeclassified.sqf +++ b/Tools/pullRelativeclassified.sqf @@ -16,11 +16,11 @@ if (isNil "CENTER") exitWith {systemChat "Please define the mission center"}; diag_log "========== =========================="; _fn_getRelPos_x = { - _opz = (getPos (_this select 0)) select 2; - _cpz = CENTER select 2; - _zd = _opz - _cpz; - private _p = (getPos (_this select 0)) vectorDiff CENTER; - _p set [2,_zd]; + //_opz = (getPos (_this select 0)) select 2; + //_cpz = CENTER select 2; + //_zd = _opz - _cpz; + private _p = (getPosASL (_this select 0)) vectorDiff CENTER; + //_p set [2,_zd]; _p; }; /////////////////// diff --git a/Tools/setCenterAtNearestRoadCone.sqf b/Tools/setCenterAtNearestRoadCone.sqf index 006b95a..74cbb83 100644 --- a/Tools/setCenterAtNearestRoadCone.sqf +++ b/Tools/setCenterAtNearestRoadCone.sqf @@ -1,3 +1,3 @@ _cone = "RoadCone_L_F"; -CENTER = getpos (nearestObject[getPos player, _cone]); +CENTER = getposASL (nearestObject[getPos player, _cone]); systemChat format["Center set to %1",CENTER];