#Player landing
1 messages · Page 1 of 1 (latest)
you can check when they take damage from fall
but not regular landing
i'm currently using that way but when the player accidentally doesn't take any fall damage it can't work for me
what are you trying to achieve btw?
explosion on landing
i'm just canceling damages here and there so i'm wondering if there is simplest way
well
u can technically u could loop all players every tick and do it that way
ooga
Yea, if you don't like to have the server online xD
ehh
on player move would be better
its certainly good but still
But that's not landing
since walking wil still trigger it
it will be if u need to check blocks under player as well
it means there is still a bit of bad lmao am i wrong
there is alot bad
ya that's why i said a way without checking every x time
combine on damage from fall + a while loop in on jump checking when player is on ground: becoems true
that can work
the only thing this wont trigger for is walking off a 3 block edge without jumping
but it should be good enough
no that isn't needed so it's alright
make sure not to trigger it twice if they jump and take damage from that fall
with what i'm doing players will always take fall damage
well
why not just check the on damage event then?
cause i don't know sometimes the player doesn't take the damage somehow
so the event can't work
hmm
I would try to fix that xD
too small of a fall
how would the loop look like
i don't know how to start a loop from an event
what loop?
he proposed me that
so when the player jumps it will start the loop to check every x time if the player is in air or ground
then when he lands it could stop the loop
so at least the loop wont work infinitely
while loop
wait 1 tick # in case the server still sees the player on the ground
while player is not on ground:
wait 1 tick # can be changed depending on accuracy
# do stuff
I guess
so if the while stops it will execute the last line right?
yeah
the loop will wait while they are in the air
and when it stops it will continue with the code
okay i will test it out thanks guys
there should be a [on] [player] land[ing] though what do you think
if it was in paper you could use skript-reflect addon to listen to it x)
well it is
it's checking events that the server has
Paper is the server
i mean for all of them
Skript works on Spigot too, with some stuff being disabled
but they are pretty much the same regardless
yeah
paper is nice