Skip to content

Commit

Permalink
added quick examples for the findposition function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Windmolders committed Nov 12, 2015
1 parent 5907d14 commit 7dae9f0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions a3_epoch_server_zcp/zcp/functions/fn_findPosition.sqf
@@ -1,4 +1,23 @@
private ["_i","_safepos","_validspot","_position"];

// _this select 0: center position (Array)
// Note: passing [] (empty Array), the world's safePositionAnchor entry will be used.
// _this select 1: minimum distance from the center position (Number)
// _this select 2: maximum distance from the center position (Number)
// Note: passing -1, the world's safePositionRadius entry will be used.
// _this select 3: minimum distance from the nearest object (Number)
// _this select 4: water mode (Number)
// 0: cannot be in water
// 1: can either be in water or not
// 2: must be in water
// _this select 5: maximum terrain gradient (average altitude difference in meters - Number)
// _this select 6: shore mode (Number):
// 0: does not have to be at a shore
// 1: must be at a shore
// _safepos = [getMarkerPos "center",0,8500,10,0,0.5,0];
// _safepos = [[15000,15000,0],0,15000,10,0,80,0];
// _safepos = [getMarkerPos "center", 0 , (getMarkerPos "center") select 0, 10, 0, 50, 0];

_safepos = [getMarkerPos "center",0,8500,(_this select 0),0,0.5,0];
_validspot = false;
_i = 1;
Expand Down

0 comments on commit 7dae9f0

Please sign in to comment.