Forum Jump :

Author Message


Posts: 43
Rank:


Level: Member

Country: se
Location:
Occupation:
Age: 31
In-game name:

 
#1 Posted at 2013-10-29 15:47        
     
Made a small script which allows you to order a helicopter to land at its current location (even though its not in your group) that I'm sharing...

Video tutorial and demonstration:


For example, add a helicopter named "ghosthawk" and a player named "soldier" in the editor. Also add a trigger set to repeatedly (codes below).

Trigger to add the action:
--------------------------------------------
Condition:
alive driver ghosthawk

On act:
soldier addAction ["Land", "land.sqf", ghosthawk, 0, false, false];
--------------------------------------------

Script:
Name it "Land.sqf" and place it in the mission directory
--------------------------------------------
_heli = _this select 3;
_unit = _this select 0;

while {(count (waypoints group _heli)) > 0} do
{
 deleteWaypoint ((waypoints group _heli) select 0);
};

waypoint1 = (group _heli) addwaypoint [getpos _heli,0];

_heli land "LAND";

_unit sidechat "Pilot, set her down.";
sleep 3;
_heli sidechat "Roger, Wilco!";
--------------------------------------------

Bonuses:
How to make the helicopter move to where you click on the map:
--------------------------------------------
Init line of soldier:
onMapSingleClick "ghosthawk move _pos; soldier sideChat format['Pilot, move to %1', mapGridPosition _pos]; true;";
--------------------------------------------

How to animate the doors on the ghosthawk.
--------------------------------------------
Condition
getPos ghosthawk select 2 < 6
Note: 6 being the height at which the doors should open

On act:
ghosthawk animateDoor ['door_R', 1]; ghosthawk animateDoor ['door_L', 1];

On dea:
ghosthawk animateDoor ['door_R', 0]; ghosthawk animateDoor ['door_L', 0];
--------------------------------------------

This post was edited by Noddan (2013-10-29 15:58, ago)


Author Message


Posts: 20614
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 43
In-game name: Foxhound

 
#2 Posted at 2013-10-29 21:09        
     
Thanks for posting here, I added a link to this thread in the Arma 3 - Mission Editing FAQ ;-)

Visit my family webshop desteigerhoutshop.nl.

Advertisement


Author Message


Posts: 16
Rank:


Level: Member

Country: nl
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2013-11-21 18:06        
     
This is nice man, keep on going!


Author Message


Posts: 14
Rank:


Level: Member

Country: au
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2013-11-22 03:02        
     
Amazing

This post was edited by Narce6 (2013-11-22 05:20, ago)






Tags: Heli, Helicopter, Land