OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: majorjustice on 26 Dec 2009, 02:05:21

Title: checking if a unit has landed?
Post by: majorjustice on 26 Dec 2009, 02:05:21
hi i have a problem with a mission im working on

ill try to fill you in im using domove for a heli to move to a randomly genrated "invisble H" around the map ,then when the heli reachs its destination   (the invisible H)   i can get it too land but there is a group in its cargo which i want to disembark which i cant seem to make happen without damaging the heli. so i wondered if there is a way of finding out if the heli had landed to then damge it so it dosent get damged in mid fligth and crash and burn

normal waypoints cant be used due to the randomly genrated H

if there is a more elegant solution to my problem im all ears

thanks in advance :)

Title: Re: checking if a unit has landed?
Post by: i0n0s on 26 Dec 2009, 03:23:14
Check the height of the helicopter. If it is < 5 then it shouldn't hurt that much ;)
Title: Re: checking if a unit has landed?
Post by: JamesF1 on 26 Dec 2009, 17:41:09
You may also want to check it's speed (http://community.bistudio.com/wiki/speed) as well, just in case of some obscure situation where the heli is low to the ground and moving quickly ;)
Title: Re: checking if a unit has landed?
Post by: DeanosBeano on 26 Dec 2009, 18:36:08

 if you want to add anymore checks you can check http://community.bistudio.com/wiki/animationPhase (http://community.bistudio.com/wiki/animationPhase) of the dampers ( depending on what the chopper is of course ;) simply get reading in flight and when on land and abuse the data .
Title: Re: checking if a unit has landed?
Post by: majorjustice on 27 Dec 2009, 18:07:28
how do i check the height of the heli?

the less than 5 idea sounds good im not sure of the script?

something like ? (heli height) <5 .....
Title: Re: checking if a unit has landed?
Post by: JamesF1 on 28 Dec 2009, 00:56:00
Nah, you'll need to the following to get the height:
Code: [Select]
getPos heli select 2; :good:
Title: Re: checking if a unit has landed?
Post by: Mostly on 07 Jan 2010, 16:55:15
If I wanted to check if a unit had landed without using a script could I still use "getpos heli select 2"? If I wanted to put it in the condition field of a waypoint what would I put? I've tried to use it but so far haven't had any luck.

Nevermind, have sorted it. I used "heli distance helipad <5" in the waypoint condition field.