Changed use ASL as reference point
This commit is contained in:
parent
57c2db770b
commit
1db215a176
@ -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.
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
|
||||
CENTER = getPos player;
|
||||
CENTER = getPosASL player;
|
||||
systemChat format["Center set to %1",CENTER];
|
@ -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];
|
||||
|
@ -16,11 +16,11 @@ if (isNil "CENTER") exitWith {systemChat "Please define the mission center"};
|
||||
|
||||
diag_log "========== <START> ==========================";
|
||||
_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;
|
||||
};
|
||||
///////////////////
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user