Jump to content

Recommended Posts

I want it to have finite uses that cannot be fixed with a sewing kit or something else. Every time you land a hit it to a mob with health it applies the multiplier or adds the damage and then it depletes the uses it has. It is not an equippable item, I just want it to be in the inventory and for it to work that way.

Been scouring for a bit and I haven't found an item that does something like this. I've found some things about finiteuses and I believe I know how to check for mobs with health, but that's about it. Any help would be appreciated.

Edited by CloverNoir

With the help of a user called Ilaskus on discord the item now gives a buff when held and stops giving it when dropped! The uses depleting when you hit something seems much harder than I thought it'd be however. Does anyone know how I could possibly just set up a ListenForEvent when you attack something and for the function to check if the mob has health so it can then deplete a use?

There's also the problem that the buff would stack if you have multiple of the item which is not something I want to happen, and potentially if we figure out the uses part it could use the finiteuses of all the instances of the item held in your inventory. 

deathscall.lua

deathscall_buff.luadeathscall.lua

After it breaking in hilarious ways, the item seems to be working just as I pictured! Huge thanks to Ilaskus for helping me with this!

I'm sharing the files here of the item and its new buff file for other people to cross reference. 

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
×
  • Create New...