OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: O Neil on 14 Jun 2003, 10:16:39
-
Hey
A heli that shoots it's missiles one after another while shooting it's machinegun at the same time......would look heroic !
As in, he UNLEASHES on a target ;)
Could it be done ?
O'Neil ;)
-
Probably not, as vehicles can only have one active firing point at a time.
-
"as vehicles can only have one active firing point at a time."
Does that mean they can only shoot at one thing at a time ?
O'Neil
-
yes O Neil
as you know (for sure) all vehicles only can fire one weapon at one time ........ ;)
-
Yea, and you can't create a shock dust effect either...but that's what scripts are for right?
O'Neil
-
If you can make a script that lets a heli have two active firing points, I'll dance like a fool for three days before calming down and playing with it.
-
Heh, I'm sure would won't be a fool when you make the script ;)
O'Neil
-
But then, who would want to play a mission against an indestructible chopper that can spew out everything before your AA soldier can fire back?
-
If your a cut-scene lover like me (Look to the left) then it would make a good part in the cut-scene.
In BlackHawk Down, I got quite pissed off at that movie, if you've read the book, you'll find they missed out half the story in the movie.
But in the story, (If I remember) there's a part where one of the Lil birds shoots off 2 rockets while shooting it's mini guns ;)
Think on it ;)
O'Neil
PS: I could be wrong...but that's not the point ::) ;)
-
Yeah, I see your point now. That wud b pretty cool ;D
-
Heh ;)
O'Neil
-
This is pretty easy to do. Check out the example I have attatched below. All you would need to do is change the weapon names if you wanted to use this on another type of helo.
Have fun! :)
-
Hey
Hey, that sounds awsome man, but it need the "lightred" Addon.
Is that the runway lights ? (I've got em already, so prob not)
Thxs anyways man
O'Neil
-
Hi General Barron i love your script :-* but i was wondering if it would be possible to stop the ai Fireing once they fly past the tank eg not faceing it.
beacause as the AI goes flying away it contiunes to fire at nothing ???
Thanks :D
-
You could Yahoo. Many different way but an easy way would to just a put a trigger down so that when he passes it put in activation heli1 setbehavious "careless" then he just wouldn't fire :D
-=CC=-
-
O'Neil:
Whoops! Sorry bout the addon, I opened up another mission and then deleted everything on it, so I guess it still thought that addon was needed. Anyway, just open up the mission.sqm file and delete the line under "addons" that says "lightred".
-
Ok, thxs man , I'll try it out.
O'Neil
-
Hey
Yea, it...a lil different, but I must say, it's some good peice of work ;)
Thxs General Barron, appreciated.
O'Neil ;)
-
you can create the nissiles at the same time your shooting your machine gun :). just use the missile= "laserGuidedBomb" camcreate (getPos hunted) type script. theres more to it .but i will leave that for you i am busy. :). oh yeh and make sure you execute the script when the mg is fired. im getting an headache just thinking about the maths.
-
Hahaha, no probs man, I'll just...make it worst for ya ;)
Are you talking about this ?
Bomb="heat125" camcreate(getpos plane); Bomb="Shell125" camcreate(getpos plane)
I'm sure your not, but, just thought I'd put that in ;)
O'Neil
PS: Just a few things, no matter what I do, the heli moves forward shooting everything, is there a way, I can make the heli just stay there and shoot ?
I want a cut-scene, where your looking at the sky, and suddenly this helicopter rises from below, and shoots the crap outta things.
Another thing, is there a way to MAKE SURE the machine gun is being used? It only shoots them when it needs to ;)
Just wondering ;)
Peace
-
Well, first off, seeing how helicopters have to tilt forward to fire their rockets at the ground, and seeing how by tilting forward the helicopter then moves forward, I don't really think you can make the helo hold still and fire his rockets at the ground. Try removing the eventhandler in the chopper's init field and see how it behaves. You would have to fight against the game's AI to make the helo hold still. Perhaps if you made the helo "auto hover", then it might work? I'm not sure exactly how to do that, but I assume it would be throught the "action" command. Check this thread:
http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=9376;start=0 (http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=9376;start=0)
Now what Anti Garble is talking about would look something like this:
_rocket = "HellfireLauncherCobra" camcreate getpos nearestobject[_this select 0,_this select 4]
_rocket setvelocity getvelocity nearestobject[_this select 0,_this select 4]
This would be placed in an eventhandler "fired", such as my script. I'm not sure about the _this select 4 (is that the element for the bullet that was fired?). The problem with this is that it would shoot off a rocket at the speed of the bullet, which is MUCH faster than rockets travel in OFP. If you knew how fast it was supposed to go, you could fix this pretty easily with a little math though.
-
Umm...hehe, yea, I'll try that, but I'm dumb ;) I'll probably come back complaining and whineing ;)
O'Neil