Weapon Hangs On One Monster

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
SPZ1
Posts: 256
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois
Contact:

Weapon Hangs On One Monster

Post by SPZ1 »

This weapon hangs on the last monster it kills. This means that you cannot kill more than one monster!! :(
Attachments
Weapon_Hangs.7z
Weapon Hangs Demonstration
(18.02 KiB) Downloaded 25 times
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Weapon Hangs On One Monster

Post by Blue Shadow »

You're not supposed to use [wiki]A_CustomMeleeAttack[/wiki] as a melee weapon attack. You want to use [wiki]A_CustomPunch[/wiki] instead.
User avatar
SPZ1
Posts: 256
Joined: Wed Aug 02, 2017 3:01 pm
Location: Illinois
Contact:

Re: Weapon Hangs On One Monster

Post by SPZ1 »

Sorry about that.... :oops:
It does exhibit some strange behavior though.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Weapon Hangs On One Monster

Post by Graf Zahl »

A_CustomMeleeAttack is a monster function, it does not work for players.
User avatar
InsanityBringer
Posts: 3386
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Weapon Hangs On One Monster

Post by InsanityBringer »

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
Post Reply

Return to “Closed Bugs [GZDoom]”