Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // nul = [Radius, Object Type] execVM "ObjectToEditor.sqf";
- // 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, []] execVM "ObjectToEditor.sqf";
- _SearchPosition = screenToWorld [0.5,0.5];
- _SearchRadius = _this select 0;
- _ObjectType = _this select 1;
- _TerrainObjects = nearestTerrainObjects [_SearchPosition, _ObjectType, _SearchRadius, false, false];
- _TerrainWalls = nearestTerrainObjects [_SearchPosition, ["WALL"], _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_Sphere200cm_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;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement