[Decorate] Making an item that makes all melee attacks stun

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!)
Post Reply
Tohg7.
Posts: 64
Joined: Sun Sep 08, 2019 11:08 am
Graphics Processor: nVidia (Modern GZDoom)
Contact:

[Decorate] Making an item that makes all melee attacks stun

Post by Tohg7. »

I was thinking of a super-move i could use in my DoomFighter mod's melee, one of the ideas i have thought of so far is an Autocombo/Ranbu super, which is why i've been wondering about how i could make it so certain melee attacks always force a pain state?
User avatar
Cherno
Posts: 1311
Joined: Tue Dec 06, 2016 11:25 am

Re: [Decorate] Making an item that makes all melee attacks s

Post by Cherno »

If you have the option to edit the weapons:

In the weapon's Fire state,use A_JumpIfInventory jump to another state which calls the melee attack with stun damage if the player has the item.
Tohg7.
Posts: 64
Joined: Sun Sep 08, 2019 11:08 am
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: [Decorate] Making an item that makes all melee attacks s

Post by Tohg7. »

Yeah, i know, but is there a way to make a melee attack always force a monster's pain state?
Jarewill
 
 
Posts: 1766
Joined: Sun Jul 21, 2019 8:54 am

Re: [Decorate] Making an item that makes all melee attacks s

Post by Jarewill »

Have the attack's puff have the +FORCEPAIN flag.
If you want the stun to last for some time, you would also need to assign a custom damage type to the puff and add a state to the monster that lasts for some time.

Alternatively if you don't want to define a new state for every monster, this is what I did:
Spoiler:
Post Reply

Return to “Scripting”