Solved Inside of area

  • 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 community!

    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.

Hobbit41

Member
Jun 15, 2017
32
0
0
Minecraft Version: 1.8

Hi again guys. Im trying to make world protection to my minigame, except team's bases.
I mean, all blocks that are breaking outside of them, are cancelled (can't break)

I have that command to create team base:
code_language.skript:
command /totpos <integer> <integer>:
    trigger:
        player is op:
            arg 1 is between 1 and 4 #4 bases
            arg 2 is between 1 and 2: #2 points
                set {base%arg 1%.%arg 2%} to location of player
                message "Point %arg 2% of base %arg 1% is set to %location of player%"
            else:
                message "Inccorect input"

So how can I cancel all blocks breakings outside of that 2 (*4) points?
SkQuerry has feature "within cuboid" but it has a lot of bugs, and can't work not within but outside of cuboid.
 
Last edited:
SkQuerry has feature "within cuboid" but it has a lot of bugs, and can't work not within but outside of cuboid.
SkQuery 'within' syntax works wonders, as I use it daily.
It can work outside cuboids too,

code_language.skript:
event-block is not within {_pos1} to {_pos2}
 
SkQuery 'within' syntax works wonders, as I use it daily.
It can work outside cuboids too,

code_language.skript:
event-block is not within {_pos1} to {_pos2}

well, i just restarted server and it did not returns any errors (it was "cant compare" error early).
But it is working very strange and contrariwise. My code now is:
code_language.skript:
on break:
    event-block is within {base1.1} to {base1.2}:
        cancel event

And I CAN break blocks IN region and can't outside of it. And if Im typing "not within", it's working backward and I cant delete blocks inside of that cuboid...
 
And I CAN break blocks IN region and can't outside of it. And if Im typing "not within", it's working backward and I cant delete blocks inside of that cuboid...
Then what's the problem? It works, right?

As a coder you dont worry about why it works this way but just the fact that it does. :emoji_stuck_out_tongue:
 
Then what's the problem? It works, right?

As a coder you dont worry about why it works this way but just the fact that it does. :emoji_stuck_out_tongue:

yep so it is) but when I tried it first time (before restart), I was not able to break ANY blocks even inside. So it's why I called it buggy.

Anyway, thanks! Maybe I'll get any more errors, then I paste them here))
 
Status
Not open for further replies.