Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Captain Toenail

DeHacked - low damage melee attack?

Recommended Posts

Hello, are there any DeHAcked experts out there able to answer my question?

 

I have created a small swarm monster that calls SkullAttack in melee range with 1 damage point. This lets it leap up at the player and cause low damage.

 

My problem is, SkullAttack keeps causing PrBoom+ to crash when there are swarms of these critters all attacking at once.

 

So I have been looking for an alternative to create a low damage melee attack, if that is possible?

 

  1. I tried PosAttack in melee range, but that plays the pistol sound - no good as I don't want to change that sound.
  2. I tried TrooAttack. It works sort of, but it's not satisfactory. Sometimes the enemy launchers fireballs and the damage is too high.
  3. Again, SargAttack - the damage is too high.

 

The only other thing I can think of is to bodge one of the projectiles to make it invisible and short lived as a melee attack, but this is not very elegant. This is for UltimateDoom so I have all the unused Doom2 functions available.

 

Any ideas?

Edited by Captain Toenail

Share this post


Link to post

What compatiblity are you aiming for? If MBF is ok (CL 11 in PrBoom+) then you can use its A_Scratch code pointer that has configurable damage. From MBFEDIT.TXT:

 

A_Scratch performs a melee (close-range) attack on the object's current target.
misc1 ("Unknown 1") indicates damage, while misc2 ("Unknown 2") indicates the
sound effect to use.

 

Share this post


Link to post

I am having to work with very basic DeHacked, so A_Scratch is unavailable. I have tried CPosAttack. It works well, but it plays the shotgun sound. Very annoying. Might try the projectile hack.

Share this post


Link to post

A_SkullAttack puts the monster into "skullfly" mode, which you can't forcibly revert. If you avoid sending it back to A_Chase, it shouldn't crash, and the skullfly mode will eventually switch off and return it to its spawn state. This of course comes with its own limitations and oddities, but you might be able to work with them.

Share this post


Link to post

You can use PosAttack on a frame of 0 duration and follow it immediately with a sound playing codepointer to cover the pistol sound. Candidates are the pain codepointer and various other choices such as Mancubus warcry.

Share this post


Link to post
1 hour ago, printz said:

You can use PosAttack on a frame of 0 duration and follow it immediately with a sound playing codepointer to cover the pistol sound. Candidates are the pain codepointer and various other choices such as Mancubus warcry.

 

Ahah this worked. Thank you.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×