Weapon Hangs On One Monster

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Weapon Hangs On One Monster

Re: Weapon Hangs On One Monster

by 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

Re: Weapon Hangs On One Monster

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

A_CustomMeleeAttack is a monster function, it does not work for players.

Re: Weapon Hangs On One Monster

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

Sorry about that.... :oops:
It does exhibit some strange behavior though.

Re: Weapon Hangs On One Monster

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

You're not supposed to use [wiki]A_CustomMeleeAttack[/wiki] as a melee weapon attack. You want to use [wiki]A_CustomPunch[/wiki] instead.

Weapon Hangs On One Monster

by 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!! :(
Attachments
Weapon_Hangs.7z
Weapon Hangs Demonstration
(18.02 KiB) Downloaded 25 times

Top