OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Walther_P38 on 06 Jun 2003, 18:20:04
-
I've read the tutorial, and I'm still having a little trouble.
Would someone be willing to hand hold me with an entire script, so I know how to do something? As in, write out exactly what I'd put in the SQS file? I'm sorry to ask someone for this, so I thought I'd try to make it as simple as possible -- as to take up less of folks' valuable time.
In this case, I'd like a 120mm heat shell to appear directly under a plane as it passes over a trigger, and drop to the ground an explode -- so it looks like the plane is dropping a bomb.
I REALLY hate asking this, but sometimes, I just don't get things unless they're explained in a way that's totally relevant to me.
-
OK. Please correct my pathetic fumblings, at least. :)
Bomber is the name of the aircraft dropping the bomb.
#start
#EXPLODE
_AmmoType = "SHELL120"
_Explosion = GetPos Bomber
_cx = _Explosion select 0
_cy = _Explosion select 1
_cz = _Explosion select 2
_tempObj = _AmmoType camCreate[_cx, _cy, _cz-5]
Yes, I did cut down the carbomb script for this. But, I'm trying to learn.
-
And yes, I realize I didn't define What Bomber was.
I need to be shown how to do that. x.x
-
Ignore this. I figured it out for myself. :)
Whee. :D
Tks Anyway. :)
-Walther
-
Although, it WOULD be nice to be shown how to make the falling bombs move forwards at the speed the jet is, instead of just dropping straight downwards in a stationary motion. :D
Anyone know? :>
-
setVelocity
-
Hmm.
What would be the stynax of that in terms of the camcreate, and the bomb?
Thanks. :)
-
lol NEVER ask me about syntax .... look it up in the command ref. You have to give an object a name when you camcreate it anyway, so just use that name and the command.
You'll need to use getDir to find out the direction of the plane, and then probably use some simple trigonometry to figure out what vectors to apply to the bomb to make it go in the same direction. If your plane is going due north or due east you probably won't need the trig.
I'm not guaranting this will work - I've never done it - but it's worth a try.