#Left click event not being called in specific situation
1 messages · Page 1 of 1 (latest)
send your script please
its WAYYY too long
I'll simplify what I wrote
just send the first few lines then
no i'll simplify because my scripts is 90,000 lines long
function blahblah(n: text):
broadcast "piss"
on left click:
blahblah("die")
on damage:
blahblah("die")
left clikc by itself works, but when damaging an entity, it doesnt work, so i added the damage event in and that works, BUT it doesn't work when im at the verge of damaging an entity
just send the revelent lines of your script in a text file and send it here
dude its wayy too big
this is basically what it is
2 events
one effect
wdym verge?
cant u just check the target entity of the player by that point
yeah i believe it's a bug
the client is actually sending an attack packet i believe
but the server rejects it because they are too far away.. so no click event
i believe that's the behavior anyways
there a way of fixing this bug? or finding a way around it?
its a client to server bug so prob not
how come other servers are able to do this
and why does my client send damage packets even though im not supposed to be hitting the mob
its called a bug for a reason
bugs can be fixed. bugs are pests you can get rid of them. thats why its called a bug.
yet they havent yet
I guess a quirk is a better name. I don't think you can change it without modifying the server
I'd do anything to fix this. all my players are complaining
you could maybe use the arm swing animation packet if other people still see the arm swinging
does on damage do the same thing?
which one is that? I have skript reflect but I have no experience other than using effects
yes. left click and damage events lead to the same function that i've set it to in the code
hmm.. then the arm swing packet is called entity animation on wiki vg I think
the specific arm swing identifier is a field within it
Do i search up "skript-reflect wiki" or..?
i've found this,
ARM_SWING
public static final PlayerAnimationType ARM_SWING```
dunno how to listen for this in skript
This is actually false
so if it was a client problem
oh really? how does it work
you'd hear the sound of an attack sound
but it counts as a left click on my client
usually sounds are server side. are you sure?
so theres somesort of hitbox restriction area left click cant get through
for example, punch someone while the server is lagging. i don't believe you will hear a sound
same reason cancelling the damage event means no sound
yes, its client side 100%, if you lag a server, it cant send sounds anymore yet it'll still have sounds when you attempt to hit a lagged player
still makes a sound for me when its cancelled lol
the damage sound? or the swinging sound?
like the weak attack sound
hmm I think that proves my hypothesis more then... if there's only that sound because that one is clientside, but the other doesn't play because it's serverside
that'd mean the client is registering it but not the server (thus no sever sound)
I could totally be wrong and I'd be interested to learn more but it seems like that just is extra evidence for my theory
the client should be sending the left click packet
but its not
so i'm thinking theres another packet
either way i dont know how to listen from the left click packet
in skript reflect, and i've been searching for it
well that's the thing
i'm saying that the client is lagging slightly behind the server. so it thinks the target player is still within reach. thus it sends a attack packet, not a left click packet. the server knows that the target player is actually out of reach. so it ignores the packet without doing any damage or calling any events
but when i teleport the player to the "out of reach range" using skript, meaning that in the server, the player should be left clicking instead of hitting, but it still doesn't activate anything
the client is the one that determines whether it's attacking or clicking, not the server
anyways you could try the interact packet
but what makes it such a big deal in this case anyways?
i want to make it so that no matter what, when you press the left mouse button, an ability is executed
even if its in front of an entity
right, but what's your use case specifically
what makes it so critical in this case
because i have a huge roster of people, people are going to complain that "sometimes" their abilities dont activate, and when it doesnt, its really bad for content and combat
what specific syntax should i use?
not really familiar with the packet addons these days so i'm not sure. i know skript-packet is pretty popular and uses pretty easy syntax which usually lines up with wiki vg pretty well
also i've made a discovery:
getting slightly off the hitbox, doesn't detect ANYTHING
SOLVED!!!!
Paper has an issue with detecting the distance of the player to a mob
mis matched information from server and client
use spigot or spigot paper
my friend i hate to say it but i think you are trying to solve an unsolvable problem
i'd love to see u prove me wrong but i think you might be searching for the impossible
the only fix i could think of requires editing ur server jar
but it literally should be possible.
trying that right now
i found why its happening and its such a stupid reason
still dont know how to solve but
skript calculates the damage range where left click is cancelled out while the damage event is present
BUT thats only for creative mode, which has a range of an extra one block
so both fields cancel out and you have a 1 block area around the entity where you cant do anything
it was a gamemode thing 🤦