OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Homefry31464 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?????)
-
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.
-
well, its ofp seconds.... so not exactly 2 mins, normally a few seconds out ::) - bit like the british railways :P
-
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"
-
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.
-
Thanks everyone. The time context helped me out, as well as counting the initial bombs. Another Topic Solved :) :)