So I was wondering how to best go about it. From my limited knowledge of modding it seems that the way to go is to give this attack a FORCEPAIN flag and to give each monster a custom Pain state for this attack's type of damage and a Blind state in which this monster would A_Wander. Something like this:
Code: Select all
Pain.BlindingWeapon:
TNT1 A 0 A_SetUserVar("user_blindtimer", ACS_NamedExecuteWithResult("LevelTimer"))
Goto Blind
Blind:
TNT1 A 0 A_JumpIfTargetInsideMeleeRange("BlindMelee") // I want the monster to fight if you bump into it
SPRT ABCD x A_Wander
TNT1 A 0 A_JumpIf((ACS_NamedExecuteWithResult("LevelTimer") - user_blindtimer) > 350, "See")
Loop
BlindMelee:
// it would be a copy of Melee, except the ending:
Goto Blind