Home   Help Search Login Register  

Author Topic: checking if a unit has landed?  (Read 2029 times)

0 Members and 1 Guest are viewing this topic.

Offline majorjustice

  • Members
  • *
checking if a unit has landed?
« 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 :)


Offline i0n0s

  • Moderator
  • *****
Re: checking if a unit has landed?
« Reply #1 on: 26 Dec 2009, 03:23:14 »
Check the height of the helicopter. If it is < 5 then it shouldn't hurt that much ;)

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: checking if a unit has landed?
« Reply #2 on: 26 Dec 2009, 17:41:09 »
You may also want to check it's speed as well, just in case of some obscure situation where the heli is low to the ground and moving quickly ;)

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: checking if a unit has landed?
« Reply #3 on: 26 Dec 2009, 18:36:08 »

 if you want to add anymore checks you can check 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 .
I love ofp

Offline majorjustice

  • Members
  • *
Re: checking if a unit has landed?
« Reply #4 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 .....

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: checking if a unit has landed?
« Reply #5 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:

Offline Mostly

  • Members
  • *
Re: checking if a unit has landed?
« Reply #6 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.
« Last Edit: 09 Jan 2010, 16:59:29 by Mostly »
They mostly come out at night. Mostly!