Author Topic: Non-auto release butterfly knife  (Read 1570 times)

I am planning on hosting a Grapple Knife server soon and there is one problem I have with the original butterfly knife, the auto release, this makes it so that if I kill someone and they where facing me when they died they would kill me after they died.

a fix for this would be very helpful

https://cdn.discordapp.com/attachments/238914176066650114/342036818893471744/Weapon_ButterflyKnife.zip

Can't promise it works. Also removed the extremely pointless '1 shell very tiny spread shotgun' code from it.

https://cdn.discordapp.com/attachments/238914176066650114/342036818893471744/Weapon_ButterflyKnife.zip

Can't promise it works. Also removed the extremely pointless '1 shell very tiny spread shotgun' code from it.
alright, thanks I'll try it out and get back to you after

Ok so I tried it out and it works pretty well for the most part but sometimes, not often but sometimes, it still auto releases

Hm. That's odd. Guess there might be a rare case where triggers are released before the player's health is updated?

Hm. That's odd. Guess there might be a rare case where triggers are released before the player's health is updated?
maybe just use Player::getState() and only make the projectile fire if the player doesn't equal the state "Dead"

Hm. That's odd. Guess there might be a rare case where triggers are released before the player's health is updated?
This happens on a lot of charged weapons. Hold a spear, then have someone kill you, then you release the spear because when you die you still release the trigger because the game doesn't prevent you from firing it when you die. I made dead bodies shoot at people before.

This happens on a lot of charged weapons. Hold a spear, then have someone kill you, then you release the spear because when you die you still release the trigger because the game doesn't prevent you from firing it when you die. I made dead bodies shoot at people before.
Yes, aware of this. I attempted to fix it by making so the projectile doesn't spawn if the player doesn't have health.

maybe just use Player::getState() and only make the projectile fire if the player doesn't equal the state "Dead"
Then again, maybe op is just experiencing cases where both players are releasing before death, and are both dying because the knife uses projectiles.

I do remember kyle had someone make an anti-auto release knife for him but he didn't release it