Page 1 of 2
Custom pain chances and suppress pain state
Posted: Sat Dec 23, 2006 11:12 pm
by Anakin S.
With custom damage types there will be custom pain and death states. So why not have custom pain chances? For example, there could be a tazer gun that is used to disorient enemies. It doesn't do very much damage but always makes an archvile or other monster go to the pain state, whereas a normal gun would almost never make an archvile go into the pain state.
Also, could there be a code pointer to suppress pain so that whenever an actor is attacked while in this frame, it doesn't enter the pain state? This could be used for enemies like the berserker in quake 2 which get knocked over when hit by something powerful and take some time to get up. If they continue getting attacked while getting up and enter the pain state each time, they'll never be able to fight back. It's also implicitly used for lost soul charging because if hit in midcharge, the lost soul won't enter the pain state even though it has a 256 pain chance.
Re: Custom pain chances
Posted: Sun Dec 24, 2006 3:16 am
by ant1991331
Anakin S. wrote:With custom damage types there will be custom pain and death states. So why not have custom pain chances? For example, there could be a tazer gun that is used to disorient enemies. It doesn't do very much damage but always makes an archvile or other monster go to the pain state, whereas a normal gun would almost never make an archvile go into the pain state.
I approve to this idea.
Posted: Sun Dec 24, 2006 9:31 pm
by HotWax
PainChance.Zap?
Posted: Mon Dec 25, 2006 2:04 am
by Anakin S.
Yeah, that's what I was thinking.
Posted: Tue Dec 26, 2006 1:42 am
by Anakin S.
I updated the first post with another suggestion: suppress pain state.
Posted: Tue Mar 27, 2007 11:02 am
by Anakin S.
BUMP
Any news? I think it is useful to have. Any chance it may be implemented?
Posted: Tue Mar 27, 2007 11:10 am
by Graf Zahl
Anakin S. wrote:BUMP
Any news?
Do you see 2.1.8 anywhere?
Posted: Thu Mar 29, 2007 10:59 pm
by Anakin S.
Do you mean you're waiting until 2.1.8 is released?
Posted: Thu Mar 29, 2007 11:11 pm
by Matt
Until then, you can have a Pain.Zap state with a zero-length A_Jump that serves as the "real" pain chance for that damage type...
Posted: Fri Mar 30, 2007 1:59 pm
by Anakin S.
The problem with that is that the monster's current sequence is still interrupted, even if it doesn't enter the true pain state. If it's walking, it will stop and restart walking. If it's attacking, it will stop and have to attack again.
I guess it's a good sign that it hasn't been [No]ed...
Posted: Mon Apr 09, 2007 10:42 am
by Tormentor667
I like this idea quite alot!
Posted: Wed May 23, 2007 1:07 am
by Nash
I need this for my RPG.
For example, if this is implemented, I can create a monster that's weak against fire to always enter its pain state when you throw a fire attack to it (and maybe print a message telling the player "it's super effective!").
Posted: Wed May 23, 2007 8:57 pm
by Anakin S.
Or you could make a centaur killer that is a rapid fire weapon that causes monsters to never enter their pain states so you can kill centaurs in Hexen with ease. If they don't go into their pain states, they won't raise their shields.
Posted: Thu May 24, 2007 8:04 am
by Graf Zahl
Done. Pain chances can be specified per damage type now. If a specific pain chance is set this will override the default. The default painchance will be used for all damage types that don't have a custom pain chance.
For the other request I added a new flag 'NOPAIN'. If this is set the actor won't ever enter the pain state. Use A_ChangeFlag to set/clear it.
Posted: Thu May 24, 2007 12:38 pm
by Nash
No pain no gain.
This is awesome. Thanks Graf.