Jump to content
  • 0

Bloody/Clean Chainsaw


Voros

Question

You know how mods like Brutal Doom and D4T have that chainsaw that becomes bloody upon hitting an enemy? I have lots of ideas how I can achieve this, but what's the recommended way to go to implement this feature?

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 0

To make sure that the right player will be affected by the right monster, better don't use RadiusGive, target pointer, or default player pointer, but somehow let the monster get a pointer to the player who actually hit it (I don't know how, but I assume it'd be possible), so that the monster would give a specific inventory to the player via GiveInventory, and the chainsaw would check for the presence of that inventory via JumpIfInventory and change its state for a different appearance.

Edited by scifista42

Share this post


Link to post
  • 0

I assume something like this might work:

1. Player selects chainsaw
2. Checks for a dummy item, else cleansaw.
3. Player chainsaws a monster
4. Upon death, it drops dummy item, which player inevitably collects
5. Checks for dummy item, switches to bloodysaw
6. Player deselects chainsaw, dummy item removed

Of course that means I'll probably have to add the dummy item checks to the other weapons too.

Share this post


Link to post
  • 0
10 hours ago, Voros said:

drops dummy item, which player inevitably collects

That's what I was warning you about not being entirely safe (if 2 players are near the monster, the wrong one might pick it up, or even if there's only 1 player, he might somehow fail to pick it up) - it should be something with actual pointers instead. Also, rather than upon death, you might want something to happen as soon as upon first hit - one solution is to give a certain damage type to the chainsaw, and define a pain state for this damage type in the monster's states, with high or 100% pain chance to be entered immediately upon the hit.

Edited by scifista42

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...