Page 1 of 1

Making a melee attack generate blood?

Posted: Mon May 19, 2008 4:17 am
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.

Re: Making a melee attack generate blood?

Posted: Mon May 19, 2008 4:21 am
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).

Re: Making a melee attack generate blood?

Posted: Mon May 19, 2008 4:38 am
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.

:(

Re: Making a melee attack generate blood?

Posted: Mon May 19, 2008 4:45 am
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.

Re: Making a melee attack generate blood?

Posted: Mon May 19, 2008 5:02 am
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.

Re: Making a melee attack generate blood?

Posted: Mon May 19, 2008 11:37 am
by Nash
Hmm well if that's the only way.

Re: Making a melee attack generate blood?

Posted: Mon Jan 11, 2016 12:50 pm
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?

Re: Making a melee attack generate blood?

Posted: Mon Jan 11, 2016 1:06 pm
by Nash
The monster hitscan codepointers should have a blood parameter IMO. It's 2016, we need to stop hacking. :D

Re: Making a melee attack generate blood?

Posted: Mon Jan 11, 2016 2:37 pm
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.

Re: Making a melee attack generate blood?

Posted: Mon Jan 11, 2016 2:56 pm
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.

Re: Making a melee attack generate blood?

Posted: Tue Jan 12, 2016 9:08 am
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.)