Pain chance factor on weapons

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Rowsol
Posts: 969
Joined: Wed Mar 06, 2013 5:31 am

Pain chance factor on weapons

Post by Rowsol »

I could really use a way to adjust pain chance on weapons, without the need to edit monsters. A setting like PainChanceFactor would work wonders. Currently, if I want a powerful weapon to have a higher chance of stunning, my only recourse is adding a bunch of mini a_explodes to the impact.
User avatar
Zhs2
Posts: 1284
Joined: Fri Nov 07, 2008 3:29 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Maryland, USA, but probably also in someone's mod somewhere

Re: Pain chance factor on weapons

Post by Zhs2 »

This is a "just" tier solution but here's how you can legally hack it:

Code: Select all

// Do this on a puff or projectile.
override void BeginPlay()
{
	Super.BeginPlay();
	if(random(1, 100) <= 40) // 40% chance to commit pain, which of course stacks on top of any current painchances. Edit to fit your needs.
	{
		bFORCEPAIN = true;
	}
}
User avatar
Rowsol
Posts: 969
Joined: Wed Mar 06, 2013 5:31 am

Re: Pain chance factor on weapons

Post by Rowsol »

Appreciate the help.

Return to “Feature Suggestions [GZDoom]”