Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

13 Good

About beako

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. HI All, I'd like to create a camera setting that can be toggled from the default 3rd person view to one where the camera is pulled back slightly and over the head, while in game and the player still has control of his unit. Thus I don't want to create a cpp for this. I've started with this below, but wondering if someone already has something scripted, whereby the player can toggled back and forth in game between two different 3rd person views? private _cam = "Land_HandyCam_F" createVehicleLocal [0,0,0]; _cam hideObject true; _cam attachTo [player, [0,-3,5]]; _cam camSetTarget getPos cursorTarget; _cam setVectorUp [0,0.60,0.40]; _cam switchCamera "EXTERNAL";
  2. HI All, I'm having problems trying to create a script that returns the value for the current active display. I want to know if the player is looking at the map or the main screen. allDisplays returns a list of all opened GUI displays, including both the map (findDisplay 12) and the main display (findDisplay 46). BUT I want to know if the map (findDisplay 12) is currently being shown and the main display (findDisplay 46) display is hidden underneath and vice-versa. Thansk in advance... RESOLVED: visibleMap
  3. OK thanks, it works. Not sure what I was doing wrong before, maybe I was running the development build but not using arma3diag_x64 ?
  4. Thanks, but once it loads the devevlopment build how or where do I use "All" diag_enable true;?
  5. HI All, I am trying to troubleshoot my SP mission, as I have an issue with a few AI groups that don't want to head to their waypoints, but don't know how to activate "All" diag_enable true; From https://community.bistudio.com/wiki/Arma_3_Diagnostics_Exe it states: Simply run the exe as you would use the standard arma3.exe. For example to perform diag on a PBO, add it as a launch parameter (-mod=@YOURMOD) Once the game is loaded, go into the editor and select 'Virtual Reality'. I am running the Development Build, but then where do I execute "All" diag_enable true;? Do I place it in initServer.sqf or Desciption.ext? I'm also don't know how to do the following as stated: For example to perform diag on a PBO, add it as a launch parameter (-mod=@YOURMOD) could someone please provide a few more steps to descibe this? Thanks in advance
  6. HI All, I cannot get the AI to move to the top level waypoints of a tower. The AI seems to stay on the ground level. How can I get the AI to move to each building position on the top floor? for example: player addAction ["<t color='#f44298' size='1' > BUILDING SEARCH</t>", { _posTestGrp = screenToWorld [0.5,0.5]; _building = "Land_Cargo_Tower_V1_No1_F" createVehicle _posTestGrp; sleep 1; _testgrp = createGroup WEST; _soldier = "B_Soldier_F"; _newUnit = _testgrp createUnit [_soldier, _posTestGrp , [], 0, "NONE"]; _buildingPositionsArray = [_building] call BIS_fnc_buildingPositions; _buildingPositionsCount = count _buildingPositionsArray; for "_i" from 10 to _buildingPositionsCount - 1 do { _wp = _testgrp addWaypoint [AGLToASL (_building buildingPos _i), 0]; //_wp waypointAttachObject _building; _wp setWaypointHousePosition _i; _testgrp setCurrentWaypoint _wp; //_wp setWaypointType "MOVE"; _arrow = createSimpleObject ["Sign_Arrow_F", AGLToASL (_building buildingPos _i)]; hint format ["moving to %1", getPosATL _arrow]; waitUntil { sleep 1; hint format ["%1m to %2", round (AGLToASL getPos _newUnit distance AGLToASL (_building buildingPos _i)), AGLToASL(_building buildingPos _i)]; ((AGLToASL getPos _newUnit distance AGLToASL(_building buildingPos _i)) < 2) }; sleep 3; deleteVehicle _arrow; }; },"",2]; I also tried without waypoints and used ATL player addAction ["<t color='#f44298' size='1' > BUILDING SEARCH</t>", { _posTestGrp = screenToWorld [0.5,0.5]; _building = "Land_Cargo_Tower_V1_No1_F" createVehicle _posTestGrp; // Land_Cargo_HQ_V1_F sleep 1; _testgrp = createGroup WEST; _soldier = "B_Soldier_F"; _newUnit = _testgrp createUnit [_soldier, _posTestGrp , [], 0, "NONE"]; _buildingPositionsArray = [_building] call BIS_fnc_buildingPositions; _buildingPositionsCount = count _buildingPositionsArray; for "_i" from 0 to _buildingPositionsCount - 1 do { _buildingPos = [(_building buildingPos _i) select 0, (_building buildingPos _i) select 1,((_building buildingPos _i) select 2) + 5] ; _arrow = "VR_3DSelector_01_default_F" createVehicle _buildingPos; _arrow setPosASL _buildingPos; sleep 0.1; /* _wp = _testgrp addWaypoint [[(getPosATL _arrow) select 0,(getPosATL _arrow) select 1, ((getPosATL _arrow) select 2) + 5], 0]; _wp waypointAttachObject _building; _wp setWaypointHousePosition _i; _testgrp setCurrentWaypoint _wp; _wp setWaypointType "MOVE"; */ _newUnit move getPosATL _arrow; waitUntil { sleep 1; hint format ["%1m to %2", round (_newUnit distance getPosATL _arrow), getPosATL _arrow]; (( _newUnit distance getPosATL _arrow) < 3) }; sleep 3; hint format ["I am here at %1", getPosATL _arrow]; deleteVehicle _arrow; }; },"",2]; But soldier does not climb up the stairs to get the first building waypoint!
  7. HI All, I'm creating a basic script that attaches a "B_Parachute_02_F" to a vehicle when it exits a plane and then opens the parachute. Sometimes the vehicle is not direction above and is slightly off the landing location, when is comes off the plane. I have set the wind to 0 in both directions. How can I script the parachute to steer to the landing location once the parachute is open? _class = "B_Parachute_02_F"; _para = createVehicle [_class, [0,0,0], [], 0, "FLY"]; _paras = [_para]; if (_vehType iskindof "car") then { _veh attachTo [_para, [0,0,0]]; //---attachment location of parachute to _veh }else{ _veh attachTo [_para, [0,0,-1]]; }; _veh allowDamage false;
  8. HI All, I'm trying to write a script that spawns units in a nearby building (like houses, farms, hangers, anything with a roof and door), but don't want them to spawn on telephone lines or electrical lines or any weird stuff... #1 I thought BIS_fnc_isBuildingEnterable would help filter these type of buildings out, but it didn't...how can I avoid spawn from these types of places? Here is my script. #2 Also, I keep getting a "Error undefined variable in expression: _building" on line 50, whenever my player leaves by 250m, but thought I defined it? Any ideas how to solve these 2 problems? thanks onMapSingleClick "player setPosATL _pos"; _civilianCount = 0; _nearbyLocations = []; _buildingArray = []; _realBuildingArray = []; while {true} do { sleep 3; waitUntil { // find "Building" near player to spawn civilians _buildingArray = nearestObjects [player, ["House"], 250]; { if ([_x, 3] call ) then {_realBuildingArray pushBackUnique _x}; } forEach _buildingArray; // player is near a location _building = objNull; if !(_realBuildingArray isEqualTo []) then { _realBuildingArray = nearestObjects [player, ["House"], 250]; _building = _realBuildingArray select ((floor random (count _buildingArray)) + 1); systemChat format ["_building: %1", typeOf _building]; // create groups of civilians _grp = createGroup civilian; for "_i" from 1 to floor random 6 do { _unit = _grp createUnit ["C_scientist_F", _building, [], 0, "NONE"]; _wp =_grp addWaypoint [position player, 10]; _wp setWaypointType "MOVE"; _wp setWaypointSpeed "LIMITED"; // spawn function for groups to keep moving to player then return then get deleted [_unit, _grp, _wp, _realBuildingArray] spawn { params ["_unit", "_grp", "_wp", "_realBuildingArray"]; waitUntil { sleep 3; // new waypoint for player that moves if ((player distance2D waypointPosition _wp) > 5) then { _wp =_grp addWaypoint [position player, 5]; _grp setCurrentWaypoint _wp; }; ( ((_unit distance2D player) < 10) or ((player distance2D _unit) > 250) ) }; // select building to return to _building = objNull; if !(_realBuildingArray isEqualTo []) then { _building = _realBuildingArray select ((floor random (count _realBuildingArray)) + 1); _wp =_grp addWaypoint [_building, 0]; _grp setCurrentWaypoint _wp; }; // return to building and get deleted waitUntil { sleep 3; (((_unit distance2D waypointPosition _wp) < 2) or ((player distance2D _unit) > 250) ) }; deleteVehicle _unit; }; }; sleep floor random 5; }; }; };
  9. Hi All, Any suggestions on how to conceal knowledge about an enemy mine after is has been revealed after a set amount of time. I was going to just delete it and recreate it in the same spot, after the player has left the area, but was wondering it there is a specific function or better work around.
  10. Hi All, How to I obtain the map dimensions of a particular map in Arma 3. worldSize returns the area bur for rectangular maps like Livonia. I want to create an area that is 500m from then end of the map height and width. hint format ["drawRectangle \n worldName: %1 \n worldSize: %2",worldName, worldSize] ; (findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["Draw",{ (_this select 0) drawRectangle [ [worldSize / 2,worldSize / 2,0], (worldSize / 2) - 500, (worldSize / 2) - 500, 0, [0,0,1,1], "#(rgb,8,8,3)color(0,1,1,0.25)" ]; }];
  11. HI ALl, I have a script for a UAV (Sentinel) that targets enemy units (tanks and soldiers)... The problem is, as part of the script their is a JTAC soldier that uses laserTarget to target the same object as the UAV. The UAV is armed with PylonMissile_1Rnd_BombCluster_01_F and PylonMissile_Missile_AGM_02_x2, but I only want the UAV to fire the AT munition (PylonMissile_Missile_AGM_02_x2) on the tank, but because the laserTarget is on the tank from the JTAC, it fires the bombcluster munition instead. How should I script for the UAV to use weapon_AGM_65Launcher on Tanks only? I've tried the following with [0] and [-1] as a turretPath for selectWeaponTurret, but has no effect...I even tried using selectWeapon with no luck. I want to avoid forceFire, since it misses the target. // laserTarget from JTAC soldier _laserTarget = laserTarget _JTACUnit; // AT Ammo Count _getPylMagArray = getPylonMagazines _airTransport; _ammoCountATArray = [0,0]; for "_i" from 1 to 2 do { if (((_getPylMagArray select (_i - 1)) find "PylonMissile_Missile_AGM_02_x2") > -1) then { _ammoCountATArray set [(_i - 1), (_airTransport ammoOnPylon ("pylon" + str _i))]; } else { _ammoCountATArray set [(_i - 1), 0]; }; }; _ammoCountAT = 0; {_ammoCountAT = _ammoCountAT + _x} forEach _ammoCountATArray; // do not user clusterbomb on tanks if !(isNull _laserTarget) then { if (_ammoCountAT > 0) then { _sentinelUAV selectWeaponTurret ["weapon_AGM_65Launcher", []]; //"BombCluster_01_F" _sentinelUAV selectWeapon "weapon_AGM_65Launcher"; }; };
  12. HI All, I'm trying to get the a laserTarget on a soldier with a player or AI user the Laser Designator to target units. The laserTarget appears on all units, including soldiers in static weapons but passes through all other soldiers. #1) Any advise on creating a laserTarget attachedTo a soldier and deleting working around removing the one that passes through the soldier? Here is the script I'm using for creating a laser line and laserTarget. params ["_startObject"]; if (isNull _startObject) exitwith {}; ["laser", "onEachFrame", { params ["_startObject"]; //if (currentVisionMode _startObject == 1) exitwith {}; _designatedObj = laserTarget _startObject; if !(isNull _designatedObj) then { _lasercolour = [1,0,0,1.5-sunOrmoon]; // first 3 numbers are RGB _range = 2500; // laser range _maxsize = 5; _start = ASLToAGL eyePos _startObject; _end = getPos _designatedObj; _int = lineIntersectsSurfaces [atltoasl _start, atltoasl _end, _startObject, _designatedObj, true, 1, "VIEW", "GEOM"]; _size = _maxsize; //hintSilent format ["_int: %1", _int]; if !(_int isEqualTo []) then { _end = (_int select 0) select 0; _end = asltoagl _end; _length = _start vectorDistance _end; systemchat format ["_length: %1 _int: %2 ", round _length, typeOf ((_int select 0) select 2)]; if (_length >= _range) then { _size = 0; } else { _size = _maxsize; }; if (_length < 1) then {_size = 0}; } else { _length = _start vectorDistance _end; systemchat format ["_length: %1", round _length]; }; drawLine3D [_start, _end, _lasercolour]; // comment this out to remove the line drawIcon3D ["\a3\data_f\car_light_flare2.paa", _lasercolour, _end, _size, _size, random 360, "", 0, 0.05, "PuristaMedium"]; },[_startObject]] call BIS_fnc_addStackedEventHandler; #2) ALSO, Is there a way to make the actual laserTarget generated from the laser designator visible in daylight. I would like to use it instead if I can as it scales in size with distance appropriately? I've tried playing with setLightIntensity, setLightBrightness, setLightColor and setLightDayLight but had not luck. thanks
  13. I thought so also at first so I used BIS_fnc_spawnVehicle, then tried to add a unit in the spawned vehicle with: _vehArray = [[0,0,100], getDir player, _x, _AIside] call BIS_fnc_spawnVehicle; _veh = _vehArray select 0; _vehCrew = _vehArray select 1; _grp = _vehArray select 2; _veh setVehiclePosition [_posLand, [], 0]; _grp addVehicle _veh; _unit = _grp createUnit ["O_V_Soldier_ghex_F", [0,0,0], [], 0, "CARGO"]; _unit moveInAny _veh; But this too does not create the unit in the "CARGO" of the vehicle.
  14. HI All, Based on createUnit using syntax type createUnit [position, group, init, skill, rank] it states ""CARGO" - The unit will be created in cargo of the group's vehicle, regardless of the passed position. If group has no vehicle or there is no cargo space available, the unit will be placed according to "NONE"." Yet, I cannot create units inside a vehicle unless I use moveIn as below. _posLand = screenToWorld [0.5,0.5]; _veh = "O_T_LSV_02_armed_F" createVehicle [0,0,100]; _grp = createGroup EAST; _veh setVehiclePosition [_posLand, [], 0]; _grp addVehicle _veh; _unit = _grp createUnit ["O_V_Soldier_ghex_F", [0,0,0], [], 0, "CARGO"]; _unit moveInAny _veh; Is there a way to create units directly inside a vehicle with designating a position or moving them in?