Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Voros

Bloody/Clean Chainsaw

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.

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.

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
×