Can I make a weapon that stuns an enemy?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
Spaceshiporion
Posts: 78
Joined: Sun Dec 03, 2023 6:58 pm

Can I make a weapon that stuns an enemy?

Post by Spaceshiporion »

I am making a melee weapon I want to be satisfying and powerful to use,
So I want enemies to walk slower & stop attacking for say, 1 second after being hit.

Does anyone know how to program that?

I think "Forcepain" might be really close to what I want, but I'm not sure how to apply this to my weapon?

Where do I add the +Forcepain?

(I'm using "A_CustomPunch")
Spaceshiporion
Posts: 78
Joined: Sun Dec 03, 2023 6:58 pm

Re: Can I make a weapon that stuns an enemy?

Post by Spaceshiporion »

I solved it with some looking around!!

I had to "define a puff" (Which I guess means something different than I thought)

And apply it into the pufftype section in A_CustomPunch.

This was easier than I thought!!

"Puff" not just referring to a sprite of a cloud was where things took a while.

Return to “Scripting”