Home   Help Search Login Register  

Author Topic: Minimum Altitude  (Read 627 times)

0 Members and 1 Guest are viewing this topic.

Buzz

  • Guest
Minimum Altitude
« on: 28 Jul 2003, 03:18:07 »
Me and a m8 of mine are workin on a dogfight map and were making a hard deck on this map. I'm still new at this scripting stuff, so how would you make it detect if the player has flown his aircraft below 500m?

deaddog

  • Guest
Re:Minimum Altitude
« Reply #1 on: 28 Jul 2003, 03:56:51 »
500 meters is pretty damn high for OFP, but you can do this:

_height = getpos planename select 2

That will return the altitude of your plane above ground.  If you want the altitude above sea level, then look in the editors depot under functions.  There is a nice function call getASLheight by Snypir.

 ;)

Offline Terame

  • Members
  • *
  • Nice one OFPEC
    • http://fantasyscifi.com/main/ fantasy scifi sci-fi
Re:Minimum Altitude
« Reply #2 on: 24 Sep 2003, 04:29:32 »
500 meters is pretty d**n high for OFP, but you can do this:

_height = getpos planename select 2

That will return the altitude of your plane above ground.  If you want the altitude above sea level, then look in the editors depot under functions.  There is a nice function call getASLheight by Snypir.

 ;)

Interested... if I wanted to have an event set to take place above or below a certain altitude (ie if the flying unit is within range I execute a flak script) how would this be worded in the trigger?


in shortened terms:
if height of plane1 is less than 200 then exec "flak.sqs"

(yes I know this isn't scripting syntax - I'm juts trying to explain in simple terms what I am trying to achieve )

thanks in advance ;D
You can travel to infinity though the endless passages of the cosmos. Even
better this belongs to you. This is your mind

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Minimum Altitude
« Reply #3 on: 24 Sep 2003, 04:40:50 »
triger shud b like dat

condition field :

getpos planename select 2 < 500

on activision :

[parameters] exec "flak.sqs"

------------------------

i donno da script u use :P

so u put da parameters need dere

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta