Home   Help Search Login Register  

Author Topic: Height above sea-level  (Read 461 times)

0 Members and 1 Guest are viewing this topic.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Height above sea-level
« on: 24 Nov 2004, 08:32:22 »
Forgive me if this is well known.  I have not seen references to it - but recently had some problems as a result.  I have seen some references to the difficulties of getting heights above sea level in some recent posts and though this might be helpful.

OFP appears to have a feature whereby moving a trigger only changes its x and y coordinates.  It does not change its z coordinate.  So if you create a trigger (called say TRIG) on the sea, then move it to a location on the map, then height of that point above sea level is = -(getPos TRIG select 2)

Note the minus sign, this is needed at the trigger remains at sea level and so is beneath the ground.
« Last Edit: 24 Nov 2004, 08:32:49 by THobson »

dAaP

  • Guest
Re:Height above sea-level
« Reply #1 on: 24 Nov 2004, 09:12:56 »
flyinheight 10 (or anything else you want)

put this in the triggerfield

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Height above sea-level
« Reply #2 on: 24 Nov 2004, 11:03:37 »
dAaP - is your reply on the correct thread?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Height above sea-level
« Reply #3 on: 24 Nov 2004, 15:30:59 »
How exactly do you move it? Under what circumstances?

:beat: *Gets Shot* :beat:

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Height above sea-level
« Reply #4 on: 24 Nov 2004, 15:44:57 »
Just use

TriggerName setPos [wherever]

it ignors the z coordinate and only changes the x & y ccordinates.

I was using the triggers to simulate an ap mine being placed by the player.  The explosions were happening but no-one wasgetting hurt, I then found that the explosions were happening 170m below ground level!
« Last Edit: 24 Nov 2004, 16:13:33 by THobson »

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Height above sea-level
« Reply #5 on: 24 Nov 2004, 16:01:38 »
Use GLs and a distance check instead then.

:beat: *Gets Shot* :beat:

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Height above sea-level
« Reply #6 on: 24 Nov 2004, 16:13:13 »
I have my mines working I just specify the x,y,and z coordinates of the explosion rather than being able to do a getpos TriggerName.