#I'm making a combo mechanic called "Bloodlust" but the combo counter is just staying at 1. Any help?
25 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Paste version of bloodlust.js from @craggy heath
trying debugging the code with some console logs, see what the current haste is, and what is stored in the map
also just a small touch, if BLOODLUST_DUR is in ticks, i recommend writing it like this, so its more readable:
const BLOODLUST_DUR = 2 * SECOND
Okay cool I added that
And I have tried to debug it in the best way I know how (which isnt great because im still bad at KJS lol) and (I think) its something wrong with the hasteLevel variable considering that the value of it stays at 1
but I have no idea why its not working :/
if it stays at one that means const currentHaste = player_bloodlust.get(atk_plyr) || 0 is setting it to zero
which means its not saved in that map, or not loaded properly
youre setting the key as the player, but that object constantly changes
you need a constant value, like the UUID or username
usually UUID
hmm okay i'll rework the script and report back
@onyx peak Okay I did it a different way that I think is much much easier and also better (maybe?). Let me know what you think
Paste version of bloodlust.js from @craggy heath
keep in mind without using the Map (per player), this will apply to all players, meaning all players will have the same hit counter since theres only 1 counter
^^
@onyx peak okay so I think I got everything worked out with the Map. However, I cant figure out how to get the reoccurring countdown to work. I am trying to get it to set your hitcounter back to 0 if you dont hit anything for 2 seconds but it resets if you do.
Paste version of bloodlust.js from @craggy heath
@craggy heath Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!
Ticket closed!