Home   Help Search Login Register  

Author Topic: Hard Deck(something to do with piloting)  (Read 563 times)

0 Members and 1 Guest are viewing this topic.

Buzz

  • Guest
Hard Deck(something to do with piloting)
« on: 21 Oct 2002, 05:42:19 »
Is it possible for someone to make a script telling if you are shooting below a certain altitude. Example: Plane a is engageing plane B. Plane B lures plane a below the hard deck. Plane A fires on plane b below the hardeck. I want the script to say that plane A has fired below the hard deck if it can be done.

Also I doubt this is possible, but making a script tell you when someone has a lock on you?

CareyBear

  • Guest
Re:Hard Deck(something to do with piloting)
« Reply #1 on: 15 Nov 2002, 15:15:07 »
U been watchin Top Gun, haven't u?  8)

For a lock-on.. no, I'm pretty sure there isn't. One thing u can do (complex solution) - use atan2 to check direction from each enemy who can target player to player, then see if that is in fact the direction they're facing. If it is, chances are they're lockin on - or trying to. U can even put dis in a trigger.. just don't ask me about da math right now.. it's past midnight and I have a headache.

Also, eventhandler "incomingmissile" on the player.

Last of all, u can create a check.. The 'hard deck' is actually a height above sea level. OFP doesn't have that sort of check, but u can check the height above *ground* level. Just decide what ur hard deck is - say 300. So, to detect if da player is below the hard deck, make a trigger. Condition is: (getpos player select 2) < 300
make it repeatedly. If it trips, player has broken the rules of engagement by goin below hard deck.

So, make onactivation of that add a "fired" eventhandler to the unit that broke the hard deck.. if the 'fired' eventhandler triggers, the unit fired while below the hard deck.. (obviously..)

make another trigger that detects above the hard deck and removes event handlers. That's ur basic approach.

Dat's it. Sorry, no 'lock on'.
« Last Edit: 15 Nov 2002, 15:20:24 by CareyBear »