Solved Finding the block under player

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ketchup_god

New Member
Jan 1, 2020
6
0
0
74
Is there a way to find the block under a player? And if not, is there a way to do something along the lines of "if block at {_coords} is stone"? I've tried the latter but it just returns <none>. I'm new to skript however so I might be missing something. Thanks for the help.
 
Use this syntax

Code:
[the] [event-]block
[the] block %direction% [%location%]

You can use this syntax to find the block below a player like this:

Code:
block below player
 
Hello, thanks for the answer, it works wonderfully. I have another question, is there a way to constantly give a player an effect (like with a beacon)? Right now, if I keep on giving a player an effect, it adds the length of the effect instead of replacing it (e.g. giving a player speed for 2 seconds twice gives the player speed for 4 seconds instead of 2 twice).
 
...?
Use a console command to give them an effect lasting for 10k seconds, i believe it then turns to an infinite amount of time.

Oh, also, https://www.docs.skunity.com, https://www.skripthub.net/docs
You don't have to use console commands, but this would work pretty much perfectly if done correctly.

Hello, thanks for the answer, it works wonderfully. I have another question, is there a way to constantly give a player an effect (like with a beacon)? Right now, if I keep on giving a player an effect, it adds the length of the effect instead of replacing it (e.g. giving a player speed for 2 seconds twice gives the player speed for 4 seconds instead of 2 twice).

Here if you wanna give them an infinite amount of time:
Code:
apply swiftness to player for 9999 seconds

Here if you wanna give them swiftness for 2 seconds every 2 second:
Code:
every 2 seconds:
    loop all players:
        apply swiftness to loop-player for 2 seconds
 
Status
Not open for further replies.