Adjusting MinMissileChance
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Ed the Bat
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
- Contact:
Adjusting MinMissileChance
Could someone teach me some specifics on MinMissileChance? I know the default defined by ACTOR is 200. What value would I use if I wanted an enemy to be, for instance, half as aggressive? One quarter? Or even double? Is there a formula I can follow?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49247
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Adjusting MinMissileChance
The entire formula is far too complicated to define 'half as aggressive'.
Here's the code:
It's hard to define 'half' in that context.
Here's the code:
Code: Select all
if (flags4 & MF4_MISSILEMORE) dist >>= 1;
if (flags4 & MF4_MISSILEEVENMORE) dist >>= 3;
int mmc = FixedMul(MinMissileChance, G_SkillProperty(SKILLP_Aggressiveness));
return pr_checkmissilerange() >= MIN<int> (dist >> FRACBITS, mmc);
- Ed the Bat
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
- Contact:
Re: Adjusting MinMissileChance
Blast, that's the part I got stuck on... Alright, thanks anyway.