Making a melee attack generate blood?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Making a melee attack generate blood?

Post by Nash »

Does anyone know how to make a melee attack generate the Blood actor upon impact? I've looked real hard but can't find the answer.

This is a great effect for monsters that wield sharp weapons like axes, swords or claws (like the Fiend in Quake) and without it I feel that my monster's melee attacks are kind of - well - just missing something.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: Making a melee attack generate blood?

Post by Cutmanmike »

There's a few ways you could fake it. One would be to have the monster create a short range none damaging ripper projectile (which spawns a LOT of blood).
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Making a melee attack generate blood?

Post by Nash »

That doesn't work if the melee attack doesn't connect. The projectile would still be spawned, and then there's the possibility that it might hit other monsters that are close to it.

:(
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: Making a melee attack generate blood?

Post by Cutmanmike »

Give the monsters the DONTRIP flag (problem if you have a ripping weapon already) and call A_CustomMissile at the same tic of the melee attack. If the projectile dies after a tic and has a small radius there's a tiny chance it will hit anything else anyway.

Another (probably easier) way would be to have the monster use a ranged (same range as the melee range) bullet attack on the same tic.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49238
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Making a melee attack generate blood?

Post by Graf Zahl »

Monsters' melee attacks don't hit. They just happen. Currently they can't generate blood because there's neither a projectile nor a hitscan involved. If you want something different you have to experiment with short range hitscans instead.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Making a melee attack generate blood?

Post by Nash »

Hmm well if that's the only way.
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

Re: Making a melee attack generate blood?

Post by D2JK »

Bump!
If you want something different you have to experiment with short range hitscans instead.
Has anyone experienced a problem where a floating monster with standard melee attack can easily beat a walking monster utilizing such short range hitscan attacks, because the latter cannot hit the former? Is it possible that the monster with the hitscan attack is unable to aim high enough vertically when the target is both too close and too high above? This doesn't seem to be a problem with the standard melee attack.

If so, what would be the best way to fix a problem like this?
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Making a melee attack generate blood?

Post by Nash »

The monster hitscan codepointers should have a blood parameter IMO. It's 2016, we need to stop hacking. :D
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Making a melee attack generate blood?

Post by Arctangent »

... It does, though?

The thing is, monster melee isn't a hitscan - it just checks of the target's in range. In fact, for that very reason that it probably can't be create a blood actor, because there's no point of impact, unlike a hitscan.
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: Making a melee attack generate blood?

Post by edward850 »

Arctangent wrote:The thing is, monster melee isn't a hitscan - it just checks of the target's in range. In fact, for that very reason that it probably can't be create a blood actor, because there's no point of impact, unlike a hitscan.
Ding ding ding, we have a winner.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Making a melee attack generate blood?

Post by NeuralStunner »

Since this is relevant again:
Graf Zahl wrote:If you want something different you have to experiment with short range hitscans instead.
I got tired of the clunky melee attacks and started doing this instead. It's quite simple to limit the range, and you can customize all kinds of things about it. What's more, if you give the monster a longer windup, it might end up hitting another monster and inducing infighting. (Oh, and they're also blockable if you have some kind of shield in your mod.)
Locked

Return to “Editing (Archive)”