I can't get NOINFIGHTING and A_PainAttack to work

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
3saster
Posts: 199
Joined: Fri May 11, 2018 2:39 pm
Location: Canada

I can't get NOINFIGHTING and A_PainAttack to work

Post by 3saster »

So experimenting with converting Scythe X's monsters to decorate, I ran into some problems. The idea is to have the projectiles the imps shoot at you turn into "ghosts" on impact that should rush towards you, then exist as free entities. Below is a more simplified example.

Code: Select all

Actor SoulBaron:BaronofHell
{
	states
	{
	Missile:
		BOSS EF 8 A_FaceTarget
		BOSS G 8 A_CustomMissile("SoulPlasma")
		Goto See
	}
}

Actor SoulPlasma:ArachnotronPlasma
{
	states
	{
	Death:
		APBX AB 5 Bright
		APBX C 5 Bright A_PainAttack("SoulImp")
		stop
	}
}

Actor SoulImp:DoomImp
{
	Health 1
	RenderStyle Add 
	Alpha 0.75
	+NOINFIGHTING
	+NOTARGET
	+FLOAT
	+NOGRAVITY
}
I'm running into two problems:
  • The A_PainAttack is always directed toward the source that fired it (in this case the SoulBaron)
  • The SoulImp can and very often does infight the SoulBaron that fired it, despite having a NOINFIGHTING flag and not taking damage (otherwise it would be dead)
This might be a bug, but it is probably me not doing stuff properly. What am I doing wrong?

Return to “Scripting”