OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: O Neil on 14 Jun 2003, 10:16:39

Title: Heli shoots missiles with machine gun
Post 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 ;)
Title: Re:Heli shoots missiles with machine gun
Post by: Mr_Shady on 16 Jun 2003, 22:41:02
Probably not, as vehicles can only have one active firing point at a time.
Title: Re:Heli shoots missiles with machine gun
Post by: O Neil on 17 Jun 2003, 09:57:59
"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
Title: Re:Heli shoots missiles with machine gun
Post by: AN ARMY OF ONE on 30 Jun 2003, 20:19:06
yes O Neil

as you know (for sure) all vehicles only can fire one weapon at one time ........  ;)
Title: Re:Heli shoots missiles with machine gun
Post by: O Neil on 01 Jul 2003, 07:11:49
Yea, and you can't create a shock dust effect either...but that's what scripts are for right?

O'Neil
Title: Re:Heli shoots missiles with machine gun
Post by: Mr_Shady on 02 Jul 2003, 00:21:50
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.
Title: Re:Heli shoots missiles with machine gun
Post by: O Neil on 02 Jul 2003, 06:51:20
Heh, I'm sure would won't be a fool when you make the script ;)

O'Neil
Title: Re:Heli shoots missiles with machine gun
Post by: max_killer_payne on 08 Jul 2003, 18:47:53
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?
Title: Re:Heli shoots missiles with machine gun
Post by: O Neil on 08 Jul 2003, 23:15:08
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  ::)  ;)
Title: Re:Heli shoots missiles with machine gun
Post by: max_killer_payne on 09 Jul 2003, 20:32:07
Yeah, I see your point now. That wud b pretty cool  ;D
Title: Re:Heli shoots missiles with machine gun
Post by: O Neil on 11 Jul 2003, 05:31:41
Heh ;)

O'Neil
Title: Re:Heli shoots missiles with machine gun
Post by: General Barron on 11 Jul 2003, 06:11:23
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! :)
Title: Re:Heli shoots missiles with machine gun
Post by: O Neil on 11 Jul 2003, 08:43:40
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
Title: Re:Heli shoots missiles with machine gun
Post by: Yahoo Reborn on 11 Jul 2003, 14:17:55
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
Title: Re:Heli shoots missiles with machine gun
Post by: CLITCOMMANDER on 11 Jul 2003, 15:23:43
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=-
Title: Re:Heli shoots missiles with machine gun
Post by: General Barron on 12 Jul 2003, 07:03:04
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".
Title: Re:Heli shoots missiles with machine gun
Post by: O Neil on 12 Jul 2003, 08:09:04
Ok, thxs man , I'll try it out.

O'Neil
Title: Re:Heli shoots missiles with machine gun
Post by: O Neil on 13 Jul 2003, 02:00:29
Hey

Yea, it...a lil different, but I must say, it's some good peice of work ;)

Thxs General Barron, appreciated.

O'Neil ;)
Title: Re:Heli shoots missiles with machine gun
Post by: anti garble on 14 Jul 2003, 19:13:02
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.
Title: Re:Heli shoots missiles with machine gun
Post by: O Neil on 15 Jul 2003, 01:06:02
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
Title: Re:Heli shoots missiles with machine gun
Post by: General Barron on 15 Jul 2003, 18:24:54
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.
Title: Re:Heli shoots missiles with machine gun
Post by: O Neil on 16 Jul 2003, 02:10:28
Umm...hehe, yea, I'll try that, but I'm dumb ;) I'll probably come back complaining and whineing ;)

O'Neil