Page 1 of 1

Plasma Ball placement

Posted: Tue Sep 18, 2012 6:23 am
by BlueFireZ88
I noticed in Vanilla Doom that the plasma sprites look as if they appear from the gun themselves. Is there a way of replicating this with a replacement actor?

Re: Plasma Ball placement

Posted: Tue Sep 18, 2012 7:52 am
by Blue Shadow
Maybe you could fire an invisible, 0-speed projectile that, itself, fires the "real" projectile using [wiki]A_SpawnItemEx[/wiki] with some offsetting. I'm not sure if it'll work flawlessly, though.

NeuralStunner made something, dubbed "Projectile Spawner", that you could probably use as base.

Re: Plasma Ball placement

Posted: Tue Sep 18, 2012 8:39 am
by BlueFireZ88
Where would I place this dummy actor though? In the plasma ball replacement actor? Or the weapon itself?

Re: Plasma Ball placement

Posted: Tue Sep 18, 2012 9:03 am
by Blue Shadow
The idea is that the weapon fires the dummy projectile, and the dummy projectile fires the "real" plasma ball one.

Oh I just thought, if you're going with Neural's code, then 0-speed isn't viable, in this case.

Re: Plasma Ball placement

Posted: Wed Sep 19, 2012 12:12 pm
by Xaser
Using a dummy projectile like that is probably more trouble than it's worth. It'd work better to either lower the spawnheight in A_FireCustomMissile or do what I do sometimes and make the first tic of the projectile animation be invisible -- this usually results in making the projectile look like it comes from the end of the gun rather than from the player's chest. It delays the shot slightly, but not enough that it's noticeable.

If you do go with the Neural method, though, keep in mind that you can still make the dummy projectile have a speed greater than zero and destroy it in less than a tic. It's easy enough to make it never affect actors anyway (+THRUACTORS mainly) even if it lasts for a tic, so no biggie there.