Home   Help Search Login Register  

Author Topic: Adding smoke to a chopper  (Read 2202 times)

0 Members and 1 Guest are viewing this topic.

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Adding smoke to a chopper
« on: 04 Feb 2005, 21:52:43 »
OK, here is a softball, I think. I hate to even ask, but my searches have come up short.

I want to add smoke grenades to a helicopter. I have tried addweapon in the init field, putting addmagazine first, but when I get into the chopper, although I can select the smokeshell, and I get the proper reticle for firing, there is no ammo, and it won't give me a reload action.

How can you have a Pink Team without red smoke grenades in the Loach?

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Adding smoke to a chopper
« Reply #1 on: 05 Feb 2005, 03:12:26 »
To add mags and weapons to a vehicle, you need to use:
Code: [Select]
_unit addMagazineCargo ["_weapon",_number]
where _weapon is the weapon
_number is the number of guns or mags
_unit is the ammo crate or vehicle

e.x.
Code: [Select]
Loons_Loach addMagazineCargo ["JAM_M16",3]

that should do it mate :D
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #2 on: 05 Feb 2005, 03:54:41 »
Tyger,

I don't think that will work. What I am trying to do is have the smoke grenades available as a weapon on the chopper, not as a supply item.

In Vietnam, we employed the OH-6A Cayuse as a scout helicopter to search out the Vietcong on the ground. Teamed with the OH-6 (Light Observation Helicopter, or "Loach") was often an AH-1 Cobra gunship. When the Scout pilot (who was hovering just inside translational lift speed at treetop level) spotted the enemy on the ground, he called in the Cobra (who was orbiting a couple of thousand feet higher in an opposite direction so he could always see the Loach) who would come down and engage the enemy with rockets.

The Loach pilot (or the observer) would drop a red smoke grenade on the enemy to mark him for the much higher Cobra and then un-ass the area as the Cobra rolled in hot. Loach drivers carried red smoke grenades by the case, and strung a few up in the cockpit  on safety wire within easy reach just for this purpose.

Offline XCess

  • Former Staff
  • ****
Re:Adding smoke to a chopper
« Reply #3 on: 05 Feb 2005, 04:16:55 »
do this:

 "smokeShellRead" camCreate getPos heloName

this will create a red smoke shell that ill drop to the ground starting from the helos position, simulatin a smokeshell being dropped from the window.. you could use:

[(getpos heloName select 0)+x,(getPos heloName select 1)+y,(getPos heloName select 2)+z]

instead of getPos heloName.. change x y and z to whatever and ull have complete control of where it's created around the helo. you could also use setVelocity to change the direction of the smoke to whatever u want.

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #4 on: 05 Feb 2005, 04:28:04 »
Xcess,

Will I be able to fire the shell out of the chopper on command (me flying, or another player) ?

When I do the addweapon init thing, I get the weapon added to the chopper's weapons fine, grenade aimer and all, just no ammo.
« Last Edit: 05 Feb 2005, 04:29:00 by Sixgun »

Dubieman

  • Guest
Re:Adding smoke to a chopper
« Reply #5 on: 05 Feb 2005, 05:08:03 »
Well generally addweapon means you have to addmagazine to shoot something. :P

As for Xcess's way, you can use actions to control the smoke shell release. It'd be better than making a new addon where the weapon would be added to the chopper itself in the first place. :-\


Offline XCess

  • Former Staff
  • ****
Re:Adding smoke to a chopper
« Reply #6 on: 05 Feb 2005, 06:00:38 »
I believe camCreate would be the only way to do it purely with scripting though... altho maybe u could make a fired eventHandler for the smokeShell weapon, but I thought that was class under throw  ???

Offline OFPWiZard

  • Members
  • *
Re:Adding smoke to a chopper
« Reply #7 on: 05 Feb 2005, 09:05:10 »
I could think of something maybe or just merdge some stuff together that i have been working on.

All i need is this questiont o be anwsered:

Do you want the chopper to drop the smoke once you get in a trigger or by a script or even in your action menu.  I could do them all.

If so it would create two sqs files... one launching the other script which the first one was triggered by a trigger or something.  The second one would give the chopper the smoke after getting the position and stuff.

I'll post again when i get up... really tired to try it out.

But i did something like that before.

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #8 on: 06 Feb 2005, 06:31:20 »
What I really want to do is add red smoke shells as a weapon to the SEB 0h-6A, so that in a co-op mission, the player scout pilot can mark targets for the player Snake pilot to hit with rockets.

I would be fine with launching them with the action menu..., I would prefer to be able to hit the change weapons key and bring them up like guns or rockets, etc. So far, I can successfully add the weapon "smokeshellred" to the chopper, and select it from the weapons menu, but there is never any ammo... I think I am just missing something small.

For those of you who did not read my original post, YES, I ADDED MAGAZINES BOTH BEFORE AND AFTER THE ADDWEAPON IN THE INIT FIELD. I even tried adding magazines incargo like Tyger suggested, just to say I did. No dice.

Am I nuts?  <<this addmagazine "smokeshellred">> Is this proper syntax? I get no errors in the editor, but in the chopper, no ammo for the smokeshell weapon. I am trying to be as clear as possible but maybe I am not explaining things well enough. :(

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Adding smoke to a chopper
« Reply #9 on: 06 Feb 2005, 10:41:32 »
Hi Sixgun

I was just passing by and saw your post and thought I'd help, if possible.  I'm not sure if this is what you want but here you go.

Create your helo and put this in its Init field -

shellsOnBoard = 24; this addaction ["Drop smoke", "dropSmoke.sqs"]

Then create the following script and put it in your mission folder -

;   dropSmoke script

? _droppingShell == 1 : exit
_droppingShell = 1

? shellsOnBoard < 1 : hint "No more smoke shells left", exit
shellsOnBoard = shellsOnBoard - 1
hint format ["Smoke away, %1 shells left !", shellsOnBoard]

"smokeShellRed" camCreate getPos helo

~3

_droppingShell = 0


Cheers !



Roni

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Adding smoke to a chopper
« Reply #10 on: 07 Feb 2005, 05:57:42 »
Not sure if this will work... I'd probably go along with the addaction script if I were you... but try:

LOH addmagazine "Smokeshellred"; LOH addweapon "throw"

A smokeshell isn't a weapon in OFP, it's a magazine. The weapon that's used to 'fire' it is called throw. As I said, it's a long shot... ;)

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Adding smoke to a chopper
« Reply #11 on: 07 Feb 2005, 06:36:39 »
It does work - I made the mini-mission to prove it !  ;D

I was working on something else but decided to add the above OH-58 and script and make the pilot the player just for a minute to test it out - bingo !

Attached is the actual script.  As I said, simply create an OH-58 named helo with the following in its Init field -

shellsOnBoard = 24; this addaction ["Drop smoke", "dropSmoke.sqs"]

It takes practice to drop right on target but after a few tries you should get it no probs.  I've mapped my "Look Around" function to the C on my keyboard - simply fly over your target and look past your toes and drop about a half second after you see the target pass under you and you should be dead on.

Happy hunting !  :D



Roni

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #12 on: 08 Feb 2005, 05:00:04 »
Roni,

First of all, thank you.

I Tried to do what you said, and I got really excited when I took off, "dropped smoke" through the action menu, and got the nice little reminder that I had only 23 shells left.

Unfortunately, I never did see any smoke, even after dropping 16 shells.

Obviously I did something wrong somewhere. I cut and pasted your script, and your addaction init line.

I will say that the chopper in question is empty on the runway at the start of my test mission, does that change anything? :'(

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Adding smoke to a chopper
« Reply #13 on: 08 Feb 2005, 05:08:08 »
Did you try what Sui suggested above?


Planck
I know a little about a lot, and a lot about a little.

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Adding smoke to a chopper
« Reply #14 on: 08 Feb 2005, 05:20:06 »
Hi Sixgun

First off - look behind you !

I had what I thought was the same problem the first time that i tried it too - trust me, the smoke IS dropping, it just takes a few seconds to start "billowing".  If you go to "Command" view and zoom around so that you're looking behind yourself you will see the smoke spewing out all over the ground.

The problem I think is the limitation of the "drop" command - the actual effect is created by only a few small particles which look dense only when they're all together.  When the shell is falling the "trail" consists of only  a few particles at any point in the line.  Of course, once the shell hits the ground it starts to billow nicely !

I combined my little marking runs with Manual Fire and a follow up rocket attack - lots of fun !  I've mapped my Look Around and Command views to convenient keys (for me at least) - after I drop smoke i jump in and out of Command vew to check my aim, then turn around for the follow up attack.

BTW - after I threw the script together I thought about how much fun it would be with a custom sound effect (hiss and fizz in the cockpit as the grenade is primed and dropped), a "hit" event handler to create much louder pinks and banging noise when the ground fire hits you and some sort of extra routine attached to the smoke script to direct your gunship buds to drop down and service the target !

If you ask nice maybe Santa will come early this year !  ;)

Cheers


Roni

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #15 on: 08 Feb 2005, 05:25:52 »
Hi, all.

I just got back from trying Sui's approach, and I am still not getting ammo to drop.

Roni, I hovered, pedal turned, and dropped from 0 feet. No smoke! :-[

Then I rechecked my video settings, all good.

I am stumped.

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Adding smoke to a chopper
« Reply #16 on: 08 Feb 2005, 05:40:06 »
Hi Sixgun

I just went and created a new mission from scratch based on the desert island and consisting of just one player West Pilot and one empty OH-58.  I copied and pasted the commands from my previous post to the Init field of the helicopter, saved the mission as a user mission and then copied in the script from the same post.  And guess what ?

It didn't work !    :-[ :wow:  :P

I tried it two or three times then I remembered - don't forget to name the helicopter "helo" !! (no quotes of course !)

I did that and bingo - smoke on the ground, smoke in the air, smoke everywhere !

I hope that this is your problem - try it and let me know how you go.

Cheers



roni
« Last Edit: 08 Feb 2005, 06:03:23 by Roni »

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #17 on: 08 Feb 2005, 22:04:07 »
Roni....

You solved it!!!

I renamed my Loach and viola!! SMOKE!!

I got pretty accurate with it very quickly, too.

You are the man!

Thanks to all who tried to help me with this one. ;D

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #18 on: 08 Feb 2005, 22:10:39 »
P.S.

Look out for the Air Cavalry now!

I will be creating multiplayer missions with this script soon, and will announce their completion.


Roni,

It looks like the observer/ gunner will be able to drop smokes too. That's awesome. Do you think you could modify or add to the script to allow the dropping of frags as well?  Just curious. ;)

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Adding smoke to a chopper
« Reply #19 on: 08 Feb 2005, 23:04:28 »
Hi Sixgun

Baby, you ain't seen nuthin yet !    ;D

You went and got me sidetracked from my current project   :cheers:   and now I've gone and dummied up an entire mission, complete with a custom smoke priming sound ("clink . . . fizzz . . .HISSS"), three extra hit sounds whenever your chopper is hit (random plink, thunk or tinkle) and best of all - a mini airstrike centred on the smoke grenade after a semirandom delay !

I was messing around on the desert island but decided to move it to something with much more cover (Everon).  After endless cycles of modification I now have 3 .50 cals on the ground giving you grief from ground fire (they work REALLY well with the extra hit sounds !) and two (soon to be three) columns of leg infantry trying to infiltrate down the Ho Chi Minh trail.

I'm going to add some extra choppers to mess the sky up a bit and give the NVA troops a script to make them doFire on your sorry ass every time you fly over them just so that you can't keep calling hellfire on them with impunity !

The current version of the mission isn't that big but even zipped it's still over 50k (due to all the custom sounds), so I can't attach it here.  If you want a copy let me know and I'll em it to you.

Death from Above !
 8)


Roni

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #20 on: 09 Feb 2005, 01:56:51 »
Roni,

Your mission sounds cool. What choppers are you using?

I am going to write a few co-op missions around the Cav troops in VN.
A couple will feature Pink Team operations (Loach and Cobra AH-1G) in the classic hunter-killer ops they undertook. Then I think I will do one featuring an artillery spotting mission in support of a LRRP team, and maybe if I get real creative, I can figure out how to do a combined arms mission with a purple team (Loaches, snakes and slicks) where you find an enemy base camp and insert the Blues, while scouting ahead of them and supporting with gunships. All set to period music, of course!

Too bad we don't have a surfboard addon....

"But sir, this is Charlie's point,"

"HEY, SON, CHARLIE DON'T SURF!!" 8)

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Adding smoke to a chopper
« Reply #21 on: 09 Feb 2005, 02:43:43 »
Hi Sixgun

So far I'm just using the standard OH-58, but I'd be happy to use a OH-6 if you can point me towards one.  I downloaded a huey pack at some stage, I actually have to clear and re-organise my addons folder before I can use it as I have about 3-400 meg of d/l'd and unopened files sitting in there !

Whichever chopper I use, I'm going to edit it to replace the rockets with a minigun.  I just Goggled for the Loach and found this info about it (but you probably already knew all this  :P ) -

http://www.fas.org/man/dod-101/sys/ac/oh-6.htm


Once again, I'm either going to try to make an addon based on the Machinegun30 or simply overlay a minigun sound effect each time the bird fires.  Illusion is reality . . .

From one of your earlier posts I got the impression that you actually served in Vietnam.  If so, do you have more info on how many grenades they carried on board ?  I picked 24 at random (say one pound each ?) which seemed about right . . .

And again, if you want any of the sounds etc just let me know and I'll zip it all off to you.

Cheers !



Roni
"I love the smell of napalm in the morning !"

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #22 on: 09 Feb 2005, 04:17:01 »
Roni,  (and anyone else)

Please do not let me give the impression that I served in Vietnam. When I said "we" earlier, I was referring to our armed forces in general. In fact, I have not had the priveledge of serving (tried to join during the Clinton years).

Actually, I am a voracious reader of books on the subject, it has always fascinated me.  My dad was an infantry Leutenant over there 71-72.

As far as Air Cav ops go, The TO&E for scout platoons operating the OH-6A included the minigun pod that mounted to the left side of the aircraft just above the skids. It was a neat arrangement in that the gun was on an electric adjustable mount that allowed the pilot to elevate or depress the gun through an arc of a few degrees. It had a teardrop shaped housing that covered the back end of the gun. Scout pilots who carried it generally did not use the supplied gun sight, but a grease pencil X on the plexiglass bubble.

Most Cav units had a standing policy of not using the minigun. The commanders felt that it prompted the scout pilot to want to stay and duel it out with the enemy, instead of mark the target and get away.

Some scout platoon leaders decided to mount the minigun anyway, and it saved the life of more than one scout pilot who was able to beat the enemy to the draw. The gun fired either 4000 or 6000 rounds per minute and depended on which "stop" the pilot pulled the trigger to. The first detent would fire the gun on low, or 4000rpm, and squeezing it all the way got you 6000rpm. The effect was incredible, see the movie Predator. That was not an exaggeration. Unfortunately, the gun fired so fast, it would be empty in a few seconds.

Most Scout platoons opted for a gunner with an M-60 mounted on a free hanging strap. Scout gunners were picked for their ability with the M-60, and Scout pilots would not fly with one who was a poor shot.

Like I said earlier, Scout pilots carried lots of smoke, and would string up a piece of aviation safety wire between the instrument panel and the left seat back (or wherever) with the wire going through the pin rings so that one needed only to be yanked off the wire and tossed out. I would think that they carried an average of a dozen grenades, not only smoke, but WP and frags too, for dropping in VC spider holes and bunkers.

Many Scout units flew with a gunner in the back, the pilot in the right seat, and an "observer" in the left front seat with an M-16 in one hand, and a red smoke grenade in the other, with the pin pulled. When the Scout took fire, the observer dropped the smoke grenade and then opened fire along with the machinegunner in the rear to cover the Loach's escape. Most scouts I read about flew with only pilot and gunner, though.

The OH-6A was in the opinion of many, the best scout helicopter ever made because of it's manuverability. Later in the war, it was phased out in favor of the newer OH-58 Kiowa, which was not as well liked. The Kiowa was chosen, it is rumored, because it was produced in President Johnson's home state of Texas, and the Hughes OH-6 was not.

In an interesting note, the OH-6 could not fly in a rainstorm for more than a few minutes, because the tailrotor (which was made of a composite material) would disintegrate.

I wish OFP was a little more realistic with the helo flight. For one, you cannot autorotate in a helo in OFP. Secondly, the tailrotor failure script is cool, but in real life, most tailrotor failures were recoverable  by maintaining a certain speed of flight, and making a running landing. Having said all that, OFP is the best Helicopter sim I have ever seen.

Wow, I didn't mean to go on like that. Got carried away.

Probably  more than anyone wanted to know about Scouts. If you're into reading, Low Level Hell By Hugh Mills is really good, and there are half a dozen others.

Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #23 on: 09 Feb 2005, 04:23:17 »
Roni,

Go download SEB's Nampack 2. They did the best Vietnam-era LoH's I have yet seen. Remember, the OH-6A has a V-tail and not a T-tail. ;D

One last point of interest regarding the smoke...If a Pink team successfully engaged the enemy and scored kills, the Scout gunner would customarily rig up a couple of red smokes on the skid and pop them as the Loach did a flyby down the home base runway.

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Adding smoke to a chopper
« Reply #24 on: 09 Feb 2005, 08:13:45 »
Hi Sixgun

Thanks for all that.  Lots of useful info in your last post, that plus my own research has given me a whole new insight into this fascinating chopper !

My own dad served in the air force in WWII, he was a powerplant specialist working on A-20 Havocs but he managed to fly around a dozen missions as a passenger dropping parafrags and delay fuzed mines on Japanese airfields in New Guinea.  Lots of interesting stories to tell !

Me, I used to fly with my Dad a lot back in high school in the 70's (gliders and single engine power), now all my flying is done by joystick and keyboard !

I downloaded an island called Meekong, but it seems to have a bug ono pening in the editor (some paddy object is missing).  It works in preview mode, but I haven't actually bothered to save any missions to MP - I don't want to put in too much effort in case it all gets lost.

I will d/l the SEB Nam pack - it sounds great.

Another idea I had was to start the player standing next to the chopper with an ammo truck with lots of addactions on it.  Things such as "Load Frag", "Load Red Smoke", "Load Blue Smoke", "Attach Minigun", "Attach Rockets" and (say) "Attach 40mm GL".

The Load actions would load 3 shells of the listed type, up to a maximum of 12 of all types.  The Attach scripts would clear all weapons from the chopper and addWeapon the appropriate device.  To minimise the number of confusing options I might put them on different trucks and have the player drive them up to the chopper.

After that - Death from Above !

Happy trails !



Roni




Offline Sixgun

  • Members
  • *
  • I'm a llama!
Re:Adding smoke to a chopper
« Reply #25 on: 10 Feb 2005, 06:03:55 »
Roni,

Thought you might like this, found on the VHPA web site. Loach cockpit complete with gunner's M-60 and safety wired smoke grenades (left side).
« Last Edit: 10 Feb 2005, 06:13:05 by Sixgun »