Help - Search - Members - Calendar
Full Version: Flak
SWR Productions Forum > Game Modding and Development > Generals/Zerohour Modding
ComradeGeneral
Is it possible to make a flak anti-air weapon? Think world war 2 flak bursting in the air. I know anti-air weapons can't have a scatter radius on them, but would the following method work. It might be super over complicated and entirely a waste of time, but that's par for the course for me.

Firing an invisible (or visible) rocket with a mob nexus behavior on it. The mob nexus has 1 invisible object on it. If the rocket dies and thus the nexus, does the slaved unit also die? If so, would it be possible to have that invisible slaved object trail slightly behind, and explode into a cloud of smoke while firing a weapon with a big radius?

Logically, I feel like that might work, but then again, this is Zero Hour and logic does not apply here.

Or maybe just an invisible rocket that creates an object when destroyed and that object fires a weapon with a cloud of smoke... I have no idea.
Shiro
It might be possible to have the weapon projectile explode once it reaches the enemy aircraft, then spawn a randomiser which produces an object out of however many possibilities, each of those possible objects spawns the cloud and damage weapon via OCL and in the OCLs you set the direction and distances.
Stalker
What do you want to achieve? The projectile not actually hitting the target but rather detonate in the air and hit it with the explosion radius?

You could add a backwards movement into the animation of the projectile, so when it actually hits the target it looks as if it was still a few meters away. Then you could add an X-offset to the detonation FX to have it explode at the (approximately) right position. The damage radius would still be at the target position though, so if you want it to hit other aircraft, you could maybe add the damage via an OCL
Chappi55
I'd just make it hit the aircraft and die silently spawning one object via OCL with some random force and angle and a little lifetime so it looks as if it exploded in a random location near the plane.
Zeke
If all your looking is a weapon that produces a cloud at the end, all you need is to make a fancy detonation fx.

If you want the smoke to actually do something, just use the china fire field method, and make it so that it's not stuck on the ground.
ComradeGeneral
So after one massive failed attempt earlier I left it for a few hours. Just came back and tried it from scratch again and got it to work. It was a pain in the ass, but the only thing to do now is add a bunch of variations, weapons and OCL's for the flak.

It fires a super tiny shell that explodes into an OCL. That OCL creates a flak explosion randomizer and creates (right now) 1 of 2 types of flak explosion objects. That explosion object dies instantly and fires a 'FlakShellExplosionEffectNN' weapon. NN being the number correlating to the object to keep things in order, so FlakShellExplosionEffect01.

The explosion effect weapon fires an OCL (also numbered nn) that creates another object for the 'poof' effect and damage. This OCL has the offset on it, so a bunch will be needed to make flak around the target aircraft.

The 'FlakTrooperPoofNN' object fires a weapon that does gattling damage over a small radius, as well as the weapon fx for the poof cloud. I know its not called poof cloud, but I liked the name.

There's probably an easier way this can be done, but I got this to work. Did I mention it was a pain in the ass?
Jet02
Does the target take damage only when it gets caught in the explosion?
Zeke
QUOTE (ComradeGeneral @ 7 Apr 2017, 10:15) *
So after one massive failed attempt earlier I left it for a few hours. Just came back and tried it from scratch again and got it to work. It was a pain in the ass, but the only thing to do now is add a bunch of variations, weapons and OCL's for the flak.

It fires a super tiny shell that explodes into an OCL. That OCL creates a flak explosion randomizer and creates (right now) 1 of 2 types of flak explosion objects. That explosion object dies instantly and fires a 'FlakShellExplosionEffectNN' weapon. NN being the number correlating to the object to keep things in order, so FlakShellExplosionEffect01.

The explosion effect weapon fires an OCL (also numbered nn) that creates another object for the 'poof' effect and damage. This OCL has the offset on it, so a bunch will be needed to make flak around the target aircraft.

The 'FlakTrooperPoofNN' object fires a weapon that does gattling damage over a small radius, as well as the weapon fx for the poof cloud. I know its not called poof cloud, but I liked the name.

There's probably an easier way this can be done, but I got this to work. Did I mention it was a pain in the ass?


Yeah that's probably the only way to get that system working since scatter doesn't work in the air.

Though personally I'd just use an AA weapon with a large damage radius and fancy detonation fx.
ComradeGeneral
QUOTE (Jet02 @ 7 Apr 2017, 4:12) *
Does the target take damage only when it gets caught in the explosion?


Yeah. Hopefully the example pics show it a bit.
Firing at this gentleman here. Set the weapon for ground-use as well, but only for testing:


Poof is offset, damage is dealt at that point too.


To show that it works, the aoe damage isn't spread out evenly because the damage point per shot varies due to the offset.


QUOTE (Zeke @ 6 Apr 2017, 5:18) *
Though personally I'd just use an AA weapon with a large damage radius and fancy detonation fx.


Yeah that makes a lot more sense... but I already added 22 options because I don't know what simple means.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.