Reduce self damage from an explosive

Discuss all aspects related to modding Zandronum here.
Post Reply
Dufferton
New User
Posts: 2
Joined: Fri Nov 16, 2018 3:50 pm

Reduce self damage from an explosive

#1

Post by Dufferton » Fri Nov 16, 2018 3:55 pm

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?

User avatar
Ænima
Addicted to Zandronum
Posts: 3523
Joined: Tue Jun 05, 2012 6:12 pm

Re: Reduce self damage from an explosive

#2

Post by Ænima » Fri Nov 16, 2018 8:17 pm

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)
­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­
Doom64: Unabsolved: New weapons, monsters, and gameplay features for coop !


ZandroSkins
: a pack made by our community

Dufferton
New User
Posts: 2
Joined: Fri Nov 16, 2018 3:50 pm

Re: Reduce self damage from an explosive

#3

Post by Dufferton » Sun Nov 18, 2018 6:36 pm

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?

Zanieon
Forum Regular
Posts: 227
Joined: Tue Jun 05, 2012 1:17 am
Location: Somewhere in the future
Contact:

Re: Reduce self damage from an explosive

#4

Post by Zanieon » Mon Nov 19, 2018 4:00 am

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.
Image

User avatar
Empyre
Zandrone
Posts: 1316
Joined: Sun Jul 08, 2012 6:41 am
Location: Garland, TX, USA

Re: Reduce self damage from an explosive

#5

Post by Empyre » Tue Nov 20, 2018 6:03 am

Maybe A_RadiusThrust would help.
"For the world is hollow, and I have touched the sky."

Post Reply