Forum Jump :

Author Message


Posts: 7
Rank:


Level: Member

Country: us
Location: Germany
Occupation: Simulation Facilitator
Age:
In-game name:

 
#1 Posted at 2018-01-01 19:22        
     
I have created my first working script that creates targets and various ranges (50m - 300m)from the players current position and along the direction the player is looking. You can manually adjust the targets range by editing the section "getPos [RG,DR]"
RG = range
DR = direction player is facing

I look forward to everyone's constructive criticism and improvements.

To run this script you must be in EDEN Editor, have your player at the location you want the targets. Once you
have that, then open debug console and paste the following :

nul = [] execVM "3DENCreation.sqf";

3DENCreation.sqf

_pdir = getDir player;
_ldir = (_pdir-90);
_rdir = (_pdir+90);
_mark = create3DENEntity ["object","Land_HelipadEmpty_F",position player getPos [50,_pdir]];
_mark2 = create3DENEntity ["object","Land_HelipadEmpty_F",position player getPos [75,_pdir]];
_mark3 = create3DENEntity ["object","Land_HelipadEmpty_F",position player getPos [100,_pdir]];
_mark4 = create3DENEntity ["object","Land_HelipadEmpty_F",position player getPos [150,_pdir]];
_mark5 = create3DENEntity ["object","Land_HelipadEmpty_F",position player getPos [175,_pdir]];
_mark6 = create3DENEntity ["object","Land_HelipadEmpty_F",position player getPos [200,_pdir]];
_mark7 = create3DENEntity ["object","Land_HelipadEmpty_F",position player getPos [250,_pdir]];
_mark8 = create3DENEntity ["object","Land_HelipadEmpty_F",position player getPos [300,_pdir]];
_target1A = create3DENEntity ["object","TargetEpopup",position _mark getPos [6,_ldir]];
_target1A setDir _pdir;
_target1B = create3DENEntity ["object","TargetEpopup",position _mark getPos [6,_rdir]];
_target1B setDir _pdir;
_target2 = create3DENEntity ["object","TargetEpopup",position _mark2 getPos [5,_ldir]];
_target2 setDir _pdir;
_target3 = create3DENEntity ["object","TargetEpopup",position _mark3 getPos [4,_ldir]];
_target3 setDir _pdir;
_target4 = create3DENEntity ["object","TargetEpopup",position _mark4 getPos [3,_ldir]];
_target4 setDir _pdir;
_target5 = create3DENEntity ["object","TargetEpopup",position _mark5 getPos [0,0]];
_target5 setDir _pdir;
_target6 = create3DENEntity ["object","TargetEpopup",position _mark6 getPos [3,_rdir]];
_target6 setDir _pdir;
_target7 = create3DENEntity ["object","TargetEpopup",position _mark7 getPos [3,_ldir]];
_target7 setDir _pdir;
_target8 = create3DENEntity ["object","TargetEpopup",position _mark8 getPos [3,_rdir]];
_target8 setDir _pdir;
_markers = [_mark,_mark2,_mark3,_mark4,_mark5,_mark6,_mark7,_mark8];
delete3DENEntities _markers;