Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // nul = [Radius, [Object Type]] call BTH_fnc_ObjectToEditorMission
- // Radius: Number - Determines how far to search for terrain objects
- // Object Type: Array - Determines what type of objects to search for, use [] for all objects
- // Example: nul = [25, []] call BTH_fnc_ObjectToEditorMission;
- // Mission friendly version, markers for objects that can't be created in the editor:
- // Sphere = Fences and walls
- // Green Arrow = Trees and Bushes
- // Blue arrow = Rocks
- // Cyan arrow = Objects with parent "HIDE"
- _SearchPosition = screenToWorld [0.5,0.5];
- _SearchRadius = _this select 0;
- _ObjectType = _this select 1;
- _TerrainObjects = nearestTerrainObjects [_SearchPosition, _ObjectType, _SearchRadius, false, false];
- _TerrainWalls = nearestTerrainObjects [_SearchPosition, ["FENCE","WALL"], _SearchRadius, false, false];
- _TerrainTrees = nearestTerrainObjects [_SearchPosition, ["TREE","SMALL TREE","BUSH"], _SearchRadius, false, false];
- _TerrainRocks = nearestTerrainObjects [_SearchPosition, ["ROCK","ROCKS"], _SearchRadius, false, false];
- _TerrainHides = nearestTerrainObjects [_SearchPosition, ["HIDE"], _SearchRadius, false, false];
- {
- _type = typeOf _x;
- _pos = ASLToAGL getPosASL _x;
- _dir = getDir _x;
- _obj = create3DENEntity ["Object",_type,_pos,true];
- set3DENAttributes [[[_obj],"Rotation",[0,0,_dir]]];
- set3DENAttributes [[[_obj],"Position",_pos]];
- } forEach _TerrainObjects;
- sleep 1;
- {
- _typeW = "Sign_Sphere100cm_F";
- _posW = ASLToAGL getPosASL _x;
- _dirW = getDir _x;
- _objW = create3DENEntity ["Object",_typeW,_posW,true];
- set3DENAttributes [[[_objW],"Rotation",[0,0,_dirW]]];
- set3DENAttributes [[[_objW],"Position",_posW]];
- } forEach _TerrainWalls;
- sleep 1;
- {
- _typeT = "Sign_Arrow_Large_Green_F";
- _posT = ASLToAGL getPosASL _x;
- _dirT = getDir _x;
- _objT = create3DENEntity ["Object",_typeT,_posT,true];
- set3DENAttributes [[[_objT],"Rotation",[0,0,_dirT]]];
- set3DENAttributes [[[_objT],"Position",_posT]];
- } forEach _TerrainTrees;
- sleep 1;
- {
- _typeR = "Sign_Arrow_Blue_F";
- _posR = ASLToAGL getPosASL _x;
- _dirR = getDir _x;
- _objR = create3DENEntity ["Object",_typeR,_posR,true];
- set3DENAttributes [[[_objR],"Rotation",[0,0,_dirR]]];
- set3DENAttributes [[[_objR],"Position",_posR]];
- } forEach _TerrainRocks;
- sleep 1;
- {
- _typeH = "Sign_Arrow_Cyan_F";
- _posH = ASLToAGL getPosASL _x;
- _dirH = getDir _x;
- _objH = create3DENEntity ["Object",_typeH,_posH,true];
- set3DENAttributes [[[_objH],"Rotation",[0,0,_dirH]]];
- set3DENAttributes [[[_objH],"Position",_posH]];
- } forEach _TerrainHides;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement