[User error] Weapon Hangs On One Monster

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Weapon Hangs On One Monster

Postby SPZ1 » Tue Mar 30, 2021 8:06 am

This weapon hangs on the last monster it kills. This means that you cannot kill more than one monster!! :(
You do not have the required permissions to view the files attached to this post.
User avatar
SPZ1
 
Joined: 02 Aug 2017
Location: Illinois

Re: Weapon Hangs On One Monster

Postby Blue Shadow » Tue Mar 30, 2021 12:22 pm

You're not supposed to use A_CustomMeleeAttack as a melee weapon attack. You want to use A_CustomPunch instead.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Weapon Hangs On One Monster

Postby SPZ1 » Tue Mar 30, 2021 2:06 pm

Sorry about that.... :oops:
It does exhibit some strange behavior though.
User avatar
SPZ1
 
Joined: 02 Aug 2017
Location: Illinois

Re: Weapon Hangs On One Monster

Postby Graf Zahl » Tue Mar 30, 2021 2:50 pm

A_CustomMeleeAttack is a monster function, it does not work for players.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Weapon Hangs On One Monster

Postby InsanityBringer » Tue Mar 30, 2021 4:13 pm

The strange behavior is because when a monster shoots you, that monster becomes your target, but it'll never change again, because your threshold gets set and that never decreases on players (it only decreases normally when A_Chase is called), so every time you would do a A_CustomMeleeAttack, you try to attack that single target like you're a monster.

Kinda reminds me of a fun and common dehacked thing where you gave the pistol the archvile attack function and it'd blow up the first thing that shot you. Not practical, but amusing for a few seconds
User avatar
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests