Page 1 of 1
Reduce self damage from an explosive
Posted: Fri Nov 16, 2018 3:55 pm
by Dufferton
I'm making a duel mod involving rocket launchers. My goal is to have the explosions of the rockets deal full damage to opponents and 50% reduced damage to the person that fired it, to encourage rocket jumping around.
Is reduced self damage possible? If so, how can I do it?
Re: Reduce self damage from an explosive
Posted: Fri Nov 16, 2018 8:17 pm
by Ænima
Instead of one explosion action ...
EXPL A 2 A_Explode(128,128,1)
... split it into two calls, one of which has the “damage shooter” flag and the other doesn’t:
EXPL A 0 A_Explode(64,128,1)
EXPL A 2 A_Explode(64,128,0)
Re: Reduce self damage from an explosive
Posted: Sun Nov 18, 2018 6:36 pm
by Dufferton
That works for reducing the self damage!
One problem though, now when I rocket jump, I'm not going as high.
Is there a way to make the explosion still push me at full force while dealing half damage?
Re: Reduce self damage from an explosive
Posted: Mon Nov 19, 2018 4:00 am
by Zanieon
Actually the engine has an internal console command for such effect which is splashfactor.
Setting that to 0.5 should give you the desired effect without any extra-code.
Re: Reduce self damage from an explosive
Posted: Tue Nov 20, 2018 6:03 am
by Empyre
Maybe
A_RadiusThrust would help.