Search the Community
Showing results for tags 'hold'.
Found 7 results
-
azimuth Tank horizontal rotation based on marker direction
thy_ posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey. I'm coding something strongly based on it I need to make AI tanks hold positions as close as possible at some marker positions managed through Eden. My version is simpler and must be more accurate about synchronizing tank direction to the selected marker direction, with smooth movement when needed, differently when we use setDir, for example: But this is what happens (image down below): tanks got their horizontal azimuths misaligned when compared with their selected marker direction. Even my debug messages (systemChat) don't make sense to me hehe. Here, both functions that m THY_fnc_CSWR_move = { // This function makes the tank goes to a marker position. // Return nothing. params ["_grp"]; private ["_markers", "_mkrSelected", "_mkrPos", "_wp"]; sleep 1; _markers = ["hold_1", "hold_2", "hold_3", "hold_4"]; _mkrSelected = selectRandom _markers; _mkrPos = getMarkerPos _mkrSelected; // Adding waypoint: _wp = _grp addWaypoint [_mkrPos, 0]; _wp setWaypointType "HOLD"; _grp setCurrentWaypoint _wp; // Waiting the tank gets closer: waitUntil { sleep 3; (((leader _grp) distance _mkrPos) < 20) }; // Do rotation: [_mkrSelected, _grp] call THY_fnc_CSWR_hold; // Return: true; }; THY_fnc_CSWR_hold = { // This function makes the tank rotate on your own axis until it reach the same direction of a specific marker. // Return: nothing. params ["_mkr", "_grp"]; private ["_clockwise", "_vehicle", "_directionToHold", "_dirRelative"]; _clockwise = false; _vehicle = vehicle (leader _grp); _directionToHold = markerDir _mkr; _dirRelative = _directionToHold - (getDir _vehicle); // Force the vehicle doest start to turn when still moving (rare, but happens): _vehicle sendSimpleCommand "STOP"; // Wait the vehicle to brakes: sleep 1; // ------------------- NEED HELP HERE DOWN BELOW ------------------------------- if ( abs(_dirRelative) > 2 ) then { if ( _dirRelative > 0 ) then { if (_dirRelative < 180) then { _clockwise = true }; } else { if (_dirRelative < -180) then { _clockwise = true }; }; if (abs(_dirRelative) > 1) then { // Originally was: > 120 if (_clockwise) then { _vehicle sendSimpleCommand "RIGHT" } else { _vehicle sendSimpleCommand "LEFT" }; waitUntil { _dirRelative = _directionToHold - (getDir _vehicle); if ( _dirRelative > 180 ) then { _dirRelative = abs(360 - _dirRelative) }; if ( _dirRelative < -180 ) then { _dirRelative = abs(_dirRelative + 360) }; // Without this line, the tank will rotate on its axis non-stop: if ( abs(_dirRelative) <= 100 ) exitWith { true }; false; }; _vehicle sendSimpleCommand "STOPTURNING"; }; systemChat format ["[Desired %1º | Executed: %2º]", markerDir _mkr, getDir _vehicle]; // ------------------- NEED HELP HERE ABOVE ------------------------------- sleep 10; [_grp] spawn THY_fnc_CSWR_move; }; // Return: true; }; Demo: cswr-tanks-holding.stratis.zip = https://drive.google.com/file/d/1EcPiF2LFo149skR6GV63Vz6hhP7o6PlV/view?usp=share_link- 1 reply
-
- 1
-
- rotation
- non-setdir
-
(and 2 more)
Tagged with:
-
Hello, everyone. As you can see from my title, I am looking for a script to use in a mission. I need to be able to unlock a door of any building in the editor. I guess there's an option in the attributes of a building that must be changed or I need to put a script in the init field. I didn't find anything useful in Google, but I think it hast to be something with: this addAction. Any suggestions? Thanks in advance. Cheers!
-
Force helicopter to stay on land while loading troops
alpha993 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have run into a fairly frustrating problem involving AI helicopter pilots and squads attempting to board helicopters. The situation is as follows: I have a helicopter with its engine on waiting on the ground. Then, I order my squad members to board that helicopter, but as soon as I do the helicopter takes off, goes to about fifty meters, and then lands again to allow my squad members to enter. This also occurs with editor-based waypoints. As soon as an AI squad activates a 'Get In' waypoint, the AI flying the helicopter shoots up into the air and then lands again. Is there any way to force the AI helicopter to not do this, and stay on the ground instead? I have tried everything from synchronizing load and get-in waypoints (with a condition to wait for the units to get in), using disableAI "ALL", disabling the simulation of the helicopter's pilot, placing an invisible helipad directly under the helicopter, etc., but nothing works. Note that it is necessary for the helicopter's engine to be on to achieve the necessary effect as this takes place during a cutscene. Any suggestions would be greatly appreciated.- 8 replies
-
- scripting
- helicopter
- (and 7 more)
-
[MP] FT-2: Fight For The Territory - RHS Edition | Hi,A3 Project
hia3official posted a topic in ARMA 3 - USER MISSIONS
RHS: AFRF + RHS: USAF (CUP Terrains) Description FT-2 RHS is a PvP (TvT) multiplayer game mode with an intensive large scale battles of two sides for strategic key locations. Over 130 playable battle locations with different amount of sectors to capture (ranging from 1 sector to 4) brings the core of teamwork and individual gameplay in a more arcade-like style, with one major task in hand - make your team win! Gameplay Each player has the possibility to spawn at thier Team base or thier deployed MHQ (if not destroyed) & captured sectors. The player starts with default equipment and is tasked to capture and hold the sectors, every time a player captures a sector he is rewarded with resources which can be used to buy more advanced equipment and\or vehicles, the same stands with eliminating other enemy players or enemy vehicles. Players can purchase new equipment at base, next to ammo caches in captured sectors or at the MHQ. Vehicles are purchased only at the Base. Features130+ locations Equipment & Vehicle Stores (Standalone GUI) DLC Vehicles and Weapons are included The ability to make up to 8 Gear Presets + 1 Quick Preset to equip your character fast Airborne deployment capability (via Billboard at Base) An option to Treat downed teammates (must have a Medkit in the backpack) Melee Assault - ability to knife your enemies without firing your main weapon Lock\Unlock Feature for your owned vehicles and an addition to throw out unwanted passangers Capturing Heavy Vehicles - an ability to throw a grenade into an enemy APC\IFV\MBT to secure it for your self A whole bunch of other features (movable mounted weapons, holstering main weapon, cutting the parachute cords, unmanned vehicles control via hotkeys, increase\decrease volume etc) Group\Party System Unique battle logging and award System Friendly Markers on Teammate units Capability to transfer resources to teammates Quick viewdistance selection feature (Hotkey) Each time a match has ended 30% of the funds are saved towards the next match Full UI translation into 8 languages (English, German, French, Russian, Polish, Portuguese, Spanish, Italian) Overview Interactive Gallery of FT-2 Missions Game servers FT-2 RHS EU | @RHSAFRF,@RHSUSAF | TS: hia3.net Location: France Required Mods: @RHSAFRF, @RHSUSAF Address: rhseu.hia3.org Port: 2402 FT-2 RHS RU | @RHSAFRF,@RHSUSAF,@CUP_Terrains | TS: hia3.net Location: Russia Required Mods: @RHSAFRF, @RHSUSAF, @CUP_Terrains Address: rhs.hia3.org Port: 2302 Media User Interface Gameplay Battle Locations Video -
[SOLVED] Squad hold until helicopter land
4K.Scar posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, Im extremely new to the trigger side of the editor, hope I can still post here.. I want a squad to hold until a helicopter arrives, at which point they load into it, after thats done the helicopter proceeds to a waypoint. How do I do that? Please keep it as simple as possible... no scripts.... PS. any simple tutorials you recommend? -
How to make AI hold before trigger?
AntisocialChump (DayZ) posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi! I am making a mission where after you walk through an area (trigger) it tells a tank to start moving to a position... But how do I make the tank not wander around before the trigger is activated?? I tried using the hold waypoint but it asks for an amount of time to hold and I don't know if there is a way to make it stop holding and start moving once the trigger is activated. Thanks! -
[MP] FT-2: Fight For The Territory | Hi,A3 Project
hia3official posted a topic in ARMA 3 - USER MISSIONS
Description FT-2 is a PvP (TvT) multiplayer game mode with an intensive large scale battles of two sides for strategic key locations. Over 50 playable battle locations with different amount of sectors to capture (ranging from 1 sector to 4) brings the core of teamwork and individual gameplay in a more arcade-like style, with one major task in hand - make your team win! Gameplay Each player has the possibility to spawn at thier Team base or thier deployed MHQ (if not destroyed) & captured sectors. The player starts with default equipment and is tasked to capture and hold the sectors, every time a player captures a sector he is rewarded with resources which can be used to buy more advanced equipment and\or vehicles, the same stands with eliminating other enemy players or enemy vehicles. Players can purchase new equipment at base, next to ammo caches in captured sectors or at the MHQ. Vehicles are purchased only at the Base. Features50+ locations Equipment & Vehicle Stores (Standalone GUI) DLC Vehicles and Weapons are included The ability to make up to 8 Gear Presets + 1 Quick Preset to equip your character fast Airborne deployment capability (via Billboard at Base) An option to Treat downed teammates (must have a Medkit in the backpack) Melee Assault - ability to knife your enemies without firing your main weapon Lock\Unlock Feature for your owned vehicles and an addition to throw out unwanted passangers Capturing Heavy Vehicles - an ability to throw a grenade into an enemy APC\IFV\MBT to secure it for your self A whole bunch of other features (movable mounted weapons, holstering main weapon, cutting the parachute cords, unmanned vehicles control via hotkeys, increase\decrease volume etc) Group\Party System Unique battle logging and award System Friendly Markers on Teammate units Capability to transfer resources to teammates Quick viewdistance selection feature (Hotkey) Each time a match has ended 30% of the funds are saved towards the next match Full UI translation into 8 languages (English, German, French, Russian, Polish, Portuguese, Spanish, Italian) Overview Interactive Gallery of FT-2 Missions Game server FT-2 Vanilla | Free Marksmen DLC | TS: hia3.net Location: France Address: hia3.org Port: 2502 Media User Interface Gameplay Battle Locations Video