smoke grenade?

Discuss Halo 2 modding, progress on figuring things out, mapfiles...you know the drill. Cheating discussion not allowed.
Post Reply
uncutshadow





Posts: 447
Joined: Sat Jul 22, 2006 2:50 pm
Location: new jersey

smoke grenade?

Post by uncutshadow »

how do you create a smoke grenade? i tried by editing the effect of the frag grenade (scale color and length), nulled the jpt of the explosion and edited the prt3 and pmov tags in the explosion effect to smoke. it works but not too good. you only see the smoke until you look at the center of where the grenade exploded and it looks crappy. how do you create a smoke grenade and what is a good length that the effect should last? (i was thinking maybe 25-40 seconds) thank you
User avatar
CaptainPoopface




Artisan Advisor Literarian 250

Posts: 408
Joined: Mon Jul 23, 2007 7:56 am

Serial chain spawning: Just like Babushka dolls

Post by CaptainPoopface »

One idea is to chain spawn a series of grenades out of the original grenade. They're Babushka doll grenades! The chained grenades should have no damage or force for their explosion, and you could (and should) null out all the effects and sounds except the smoke. Set the weight of the spawned grenades very high so that they don't get blasted far from the initial explosion, and be sure to set their "health" in the hlmt so that they don't get destroyed by the initial explosion (this causes a resource race that leads to deadlock, which means frozen Xbox).

Let's say you want the smoke to last 30 seconds. And let's say the smoke effect of the frag grenade lasts 5 seconds (I don't know how long it actually lasts). This means, after the first grenade explodes, the minimum number of grenades you'll need is 6. Because each grenade creates 5 seconds of smoke, and 5 x 6 = 30.

First, configure the spawned nade the way you want: Duplicate (recursively) the frag nade. It will be called frag nade (1). Null all the effects and sounds you don't absolutely need in order to prevent lag. Set the detonation timer to 5 seconds, set the detonation timer to start "Immediately," and set the Air Gravity Scale to 100. Set the damage effects to 0 force and 0 damage. Set the health of the nade higher than the damage of the frag nade explosion so it doesn't die as soon as it's spawned. Adjust the explosion effect of frag nade (1) so that it chain spawns frag nade (1) (This will create an infinitely respawning grenade, but don't worry. We'll change it later).

Now, recursively duplicate frag nade (1) 5 more times. You now have frag nade (2), (3)...(6). Because you duplicated recursively, each nade gets a unique set of tags. This is essential. In the [effe] category, you should see frag grenade explosion (1) through (6). Edit the detonation effect for nade (1) so that it spawns nade (2). Edit the effect for nade (2) so that it spawns nade (3). Edit the effect for nade (3) so that it spawns nade (4). And so on, until you get to nade (6), in which case you want to null out the nade(1) that is set to spawn from it.

Do you see how this works? You throw a grenade. It spawns grenade 1 for 5 seconds of smoke, which spawns grenade 2 for 5 seconds of smoke, which spawns 3->4->5->6, which spawns nothing, because we want the smoke to go away at that point. And we have 30 seconds of smoke.

One easy way to screw this up (I speak from experience): Make sure you match duplicated nades with their corresponding detonation effects. So nade(3) has detonation_effect(3). Recursive duplication does not automatically match the duplicated dependencies. You have to do it yourself.

This is how I made "proximity mines" with a timer.

If you are not comfortable with chain spawning and tag swapping, the knowledge is here in the forum. Zone 117 wrote an excellent tutorial on chain spawning that will teach you all you need to know.

Good luck.

EDIT: See also P8ntballer's mod called P8ntball. He made a good smoke grenade in that mod.
Post Reply