#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)

craggy heath
#

The basic mechanic is working but I am trying to get consecutive hits to stack the haste effect (up to 5). Currently it only adds the Haste 1 effect and doesn't add it for consecutive hits. I am still pretty new to Kubejs and I'd love any help

pseudo kernelBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

void lavaBOT
#

Paste version of bloodlust.js from @craggy heath

onyx peak
#

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
craggy heath
#

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 :/

onyx peak
#

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

craggy heath
#

hmm okay i'll rework the script and report back

craggy heath
#

@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

void lavaBOT
#

Paste version of bloodlust.js from @craggy heath

onyx peak
#

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

craggy heath
#

ohhhh shit

#

okay I'll see what I can do

#

thanks

onyx peak
#

^^

craggy heath
#

@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.

void lavaBOT
#

Paste version of bloodlust.js from @craggy heath

pseudo kernelBOT
#

@craggy heath Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!