Page 1 of 2
emitted shot exploding on shooter
Posted: 02 Sep 2011, 06:01
by smoth
I have a mech with 2 shots. 1 is fired regular and the other is fired as an emit to replicate twin linked guns.

shot A is the emited shot.
When the mech is moving, shot A will explode on the mech if it is fired in front of the ms
the weapon def
When stationary it fires fine.
Any idea what I can do to prevent the shot from exploding on the mech?
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 06:58
by knorke
I always wondered if you emit a weapon, how does the projectile know which direction/speed etc to go? (and where will homing missiles home to?)
Anyway, if it does not work, couldnt you use projectiles=2 or
burst=2,
burstdelay=very short
?
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 13:32
by smoth
Burst only fires out of 1 emit point.
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 13:34
by FLOZi
smoth wrote:Burst only fires out of 1 emit point.
Pretty sure you can use Query or Shot to move between points?
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 13:40
by smoth
Nope. I tried before with the rx79 plus.
unless something has changed.
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 13:46
by Niobium
smoth wrote:Nope. I tried before with the rx79 plus.
unless something has changed.
Check out the Scalpel (nsaclash) hover in Zero-K, fires 2 rockets simultaneously from different points using 1 weapon and projectiles=2
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 13:56
by smoth
when did this get added? I don't remember such a tag? Also will try when I get home.
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 16:26
by knorke
smoth wrote:Burst only fires out of 1 emit point.
works by returning different emit points in QueryWeapon()
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 16:31
by smoth
Burst also requires a delay. This is a twin linked weapon.
Example of query return script please?
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 16:42
by knorke
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 16:43
by Erik
It works if you use QueryWeapon with alternating points AND setting projectiles=2.
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 17:02
by smoth
eric, twin linked means firing together simultaneously as one.
Re: emitted shot exploding on shooter
Posted: 02 Sep 2011, 19:50
by knorke
oh, in that case you just have to use QueryWeapon with alternating points AND setting projectiles=2
Re: emitted shot exploding on shooter
Posted: 03 Sep 2011, 08:37
by KDR_11k
The demo unit for that feature was the bunny from Lolimod, fires twin rocket launchers in a 3 round burst (i.e. 6 projectiles in total) with each projectile launching at a different angle.
Use ShotX to cycle through your firepoints, QueryWeapon gets called by the aiming code as well.
Re: emitted shot exploding on shooter
Posted: 04 Sep 2011, 12:59
by Forboding Angel
Cannon (anything that didn't trigger another weapon)
Aka plasma. Shoots a ballistic projectile. Unlike the DGun it aims properly. Can't be emit-sfxed properly, maybe a ballistic DGun can fill that role.
Long story short, you can't emit cannon shots. Just give it another weapon and slave to 1. That will achieve the desired behavior. I agree though, I prefer to emit weapons when I can just for efficiency's sake, but with a cannon projectile you cannot to it. The projectile will explode usually the moment it is emitted (A lot of this has to do with the fact that the emitted cannon projectile gains no velocity and just falls to the ground usually (if it didn't explode outright).
So, your choices are, A: give it another weapon, slave 2 to 1, or B: use a different weapontype. Shitty.
I suggest petitioning the devs to fix cannon weapontype emits.
Re: emitted shot exploding on shooter
Posted: 04 Sep 2011, 16:26
by smoth
Forboding Angel wrote:1. That will achieve the desired behavior. I agree though, I prefer to emit weapons when I can just for efficiency's sake, but with a cannon projectile you cannot to it.
No other weapon can get high trajectory. Dealwithit.jpg.
Forboding Angel wrote:The projectile will explode usually the moment it is emitted
You didn't read the thread. it emits fine. It doesn't fall to the ground etc.
Forboding Angel wrote:(A lot of this has to do with the fact that the emitted cannon projectile gains no velocity and just falls to the ground usually (if it didn't explode outright).
maybe
your weapon def was incorrect.
Re: emitted shot exploding on shooter
Posted: 04 Sep 2011, 17:32
by KDR_11k
Forboding Angel wrote:Cannon (anything that didn't trigger another weapon)
Aka plasma. Shoots a ballistic projectile. Unlike the DGun it aims properly. Can't be emit-sfxed properly, maybe a ballistic DGun can fill that role.
Long story short, you can't emit cannon shots.
That's outdated information. You can emit cannon shots these days.
Still, for twin-linked guns the projectiles tag is the better option. The ShotX function can cycle between firing points in a multi-projectile attack just fine. Emit-sfx makes more sense if you want to force the weapon on a different trajectory than the engine would aim at (e.g. the spread attack pattern on KP's touhou units). Linking two actual weapons on the unit only makes sense if they're not alike.
Anyway, emit-sfxing for aimed shots is not a good idea because the aim of the parts on the model is often off as the aiming function only gets called in certain intervals. It's usually too small to notice but when you use it for aiming shots it'll amplify the aiming error.
Re: emitted shot exploding on shooter
Posted: 04 Sep 2011, 17:40
by smoth
yeah, I am moving it to that kdr, I was just addressing forbs incorrect points.
Re: emitted shot exploding on shooter
Posted: 04 Sep 2011, 19:01
by smoth
I tried the code and it doesn't like fireweapon it seems to require the function shot instead.
any idea on this?
Re: emitted shot exploding on shooter
Posted: 04 Sep 2011, 19:03
by knorke
smoth wrote:I tried the code and it doesn't like fireweapon it seems to require the function shot instead.
any idea on this?
tl;dr