#Getting Attack Indicator

13 messages · Page 1 of 1 (latest)

tawdry tundra
#

is it possible to get the player's attack indicator?

rugged sirenBOT
#

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

tawdry tundra
#

Getting Attack Indicator

wheat stirrupBOT
#

The XY problem is when you really want to do X, and you think that Y can achieve X. However, you can't get Y to work, and so ask for help exclusively about Y.

This can lead to a lot of confusion from the people trying to help you, as Y can seem like a very random thing to want to do, and a lot of the time isn't the best way to achieve X anyway.

Its fine to ask about Y, just always include some context about X so you can be put on the right track if Y won't do X well, or there is an easier way to do X.

stone flicker
#

what you want to implement

tawdry tundra
#

I'm trying to mimic the sweep attack on swords and it only does it when there's 84.8% of the charge

stone flicker
#
ItemEvents.rightClicked(e => {
    e.server.tell(e.player.mainHandItem.item.attackSpeed)
    e.server.tell(e.player.lastAttackedTicks)
})

i think you can use these two values and calculate the progress somehow

#

wait, seems the second method doesnt exist, maybe a mod on my side is adding that

tawdry tundra
#

well I'm not using a item so i don't think i can use that

#

i just have the player with a empty hand

stone flicker
#
ItemEvents.rightClicked(e => {
    e.server.tell(e.player.getAttackStrengthScale(1))
})
#

this value is the percentage

tawdry tundra
#

ok thats works thanks