mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
DZE_RequiredItemsCheck returns bool, displays an error of all the tools the player is missing to build the item. DZE_BuildChecks returns array of bools, canBuild and if the item is a plotPole. Also has the ability to check if the player has required tools to build using DZE_RequiredItemsCheck. The vanilla build script still needs to be modified to work over water and allow players to place floating objects, but now uses plot checks. It would be easiest to just modify the configs to use the epoch building scripts instead. fnc_getSetPos now accepts a position as the second element of the input array. the object will be set to this position if it is used. This change requires no code updates Note: scripts with build and/or tool checks should be updated to use the new functions
15 lines
289 B
Plaintext
15 lines
289 B
Plaintext
//DO NOT USE IF YOU NEED ANGLE COMPENSATION!!!!
|
|
private "_pos";
|
|
|
|
_thingy = _this select 0;
|
|
if ((count _this) > 1) then {
|
|
_pos = _this select 1;
|
|
} else {
|
|
_pos = getPosASL _thingy;
|
|
};
|
|
|
|
if (surfaceIsWater _pos) then {
|
|
_thingy setPosASL _pos;
|
|
} else {
|
|
_thingy setPosATL (ASLToATL _pos);
|
|
}; |