Create block radius around 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.

Ariuw

Member
Sep 6, 2017
42
1
8
30
Hello there, I've been trying to do a block radius around player when the player right clicks on a stick but I can't get it to work this is what I have so far:

Code:
on right click with stick:
        create a fake explosion at event-location
        loop all blocks in radius 6 around player:
            y coordinate of loop-block is y coordinate of player:
                set loop-block to diamond block
                wait 1 second
                set loop-block to air

This will do nothing, it will just do the fake explosion.. any ideas?

This is what I want:
InwlLCL.png
 
Debug it, broadcast the y-coord, I'm pretty sure blocks have .5 at the end of each coord
 
Yeah, it's .5 but I don't know how to fix it then, like what should I do to fix it then?
Basically just do
y-loc of player's location is (y-loc of loop-block's location + 0.5) or 0.5, depending if it go up or down
 
I don't think that the issue is the block's y cord since I've done such a thing before, I'm not sure what the issue is though either..maybe try this? That's the way I'd do it:

Code:
on right click with stick:
        create a fake explosion at event-location
        set {_y} to y coordinate of player's location
        loop all blocks in radius 6 around player:
                if y coordinate of loop-block is {_y}:
                        set loop-block to diamond block
                        wait 1 second
                        set loop-block to air
Like maybe the issue is the way you get the y coordinate instead?
 
Status
Not open for further replies.