Home   Help Search Login Register  

Author Topic: Detect Bomb Drop  (Read 572 times)

0 Members and 1 Guest are viewing this topic.

Homefry31464

  • Guest
Detect Bomb Drop
« on: 24 Mar 2003, 00:33:33 »
Is it possible to detect whether or not a specific aircraft has dropped a bomb?  Also, is there a way to have a certain plane take off after a certain amount of time?  What are the numbers of time equal to? (Like 120 equals two minutes?????)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Detect Bomb Drop
« Reply #1 on: 24 Mar 2003, 00:45:13 »
Time is in seconds or hours depending on the context.   I don't think OFP ever uses minutes.     It's usually seconds.  

Making a plane wait is easy.   There are several ways to do it, but probably the easiest is to give it an extra MOVE waypoint on the taxiway.   Use the timeout fields in the waypoint to make the plane wait there.     Put 120 in each box if you want exactly two minutes.
Plenty of reviewed ArmA missions for you to play

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Detect Bomb Drop
« Reply #2 on: 24 Mar 2003, 14:30:27 »
well, its ofp seconds.... so not exactly 2 mins, normally a few seconds out  ::) - bit like the british railways  :P
Proud Member of the Volunteer Commando Battalion

Ace

  • Guest
Re:Detect Bomb Drop
« Reply #3 on: 24 Mar 2003, 15:07:24 »
untested but should work:

add this to a trigger

player addEventHandler ["fired",{_this exec "bomb.sqs"}];"

and in bomb.sqs put :

#checkdropped
?_this select 3 == "laserguidedbomblauncher" : "goto bombdropped"

#bombdroped
hint "You dropped a bomb"


Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:Detect Bomb Drop
« Reply #4 on: 25 Mar 2003, 08:09:37 »
Ace's suggestion looks  :o fancy, and I'm sure it'll work with resistance. Or not. I don't know. Haven't had the damned thing long enough to get to know all these new things...

Anyhow, in the old days we'd start by counting the ammo in the plane's launcher:

initAmmo= AeroPlane ammo "laserGuidedBombLauncher"

and then we'd wait to see if he's dropped a bomb with a little:

? AeroPlane ammo "laserGuidedBombLauncher" < InitAmmo

you can do this with triggers too, obviously, by counting the initial ammo in one trigger (or init.sqs, although I'm not too sure how well that works) and then having another trigger with the above mentioned condition...
"laserGuidedBombLauncher" is the name for the OFP LGB weapon, so if you've got some custom bomb in mind change the name. Also, if you already know how many bombs the plane has, you can just use a simple < (numberOfInitialBombs).

G'luck  :toocool:

Wolfrug out.
« Last Edit: 25 Mar 2003, 08:10:18 by Wolfrug »
"When 900 years YOU reach, look as good you will not!"

Homefry31464

  • Guest
Re:Detect Bomb Drop
« Reply #5 on: 28 Mar 2003, 04:10:42 »
Thanks everyone.  The time context helped me out, as well as counting the initial bombs.  Another Topic Solved   :)  :)