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!
You can always check out skUnity Downloads for downloads and any other information about Skript!
Thanks, i found the skript in the forum. ClickNot sure thats possible, could you tell me what is for so we can find a different solution?
This is such a waste of performance. You can just calculate sides of box and then calculate volume of that box. You don't have to loop through each block in box.Thanks, i found the skript in the forum. Click
set {_a} to x coord of {_loc2} - x coord of {_loc1}
set {_b} to y coord of {_loc2} - y coord of {_loc1}
set {_c} to z coord of {_loc2} - z coord of {_loc1}
set {_V} to {_a} * {_b} * {_c}
send "%{_V}% blocks found!"
It is not working. I am not a master skripter so i dont know where is the problem. It is just finding 0 blocks.This is such a waste of performance. You can just calculate sides of box and then calculate volume of that box. You don't have to loop through each block in box.
Code:set {_a} to x coord of {_loc2} - x coord of {_loc1} set {_b} to y coord of {_loc2} - y coord of {_loc1} set {_c} to z coord of {_loc2} - z coord of {_loc1} set {_V} to {_a} * {_b} * {_c} send "%{_V}% blocks found!"
command /test:
trigger:
set {_a} to x coord of {_loc2} - x coord of {_loc1}
set {_b} to y coord of {_loc2} - y coord of {_loc1}
set {_c} to z coord of {_loc2} - z coord of {_loc1}
set {_V} to {_a} * {_b} * {_c}
send "%{_V}% blocks found!"
command /loc1:
trigger:
set {_loc1} to target block's location
command /loc2:
trigger:
set {_loc2} to target block's location
When players use my skript it will count the blocks from the area that player's located and then it will set a block (selected block by player) to area and then remove blocks from inventory. I made it.What are you even trying to do lol?
Remove `_`s from `{_loc1}` and `{_loc2}` to make them global variables. `_` means it's local variable and those are only available in local scope.It is not working. I am not a master skripter so i dont know where is the problem. It is just finding 0 blocks.
Code:command /test: trigger: set {_a} to x coord of {_loc2} - x coord of {_loc1} set {_b} to y coord of {_loc2} - y coord of {_loc1} set {_c} to z coord of {_loc2} - z coord of {_loc1} set {_V} to {_a} * {_b} * {_c} send "%{_V}% blocks found!" command /loc1: trigger: set {_loc1} to target block's location command /loc2: trigger: set {_loc2} to target block's location
Okay, I'll try when i'm avaliable. So you mean when i remove '_'s from variables, they can be used from another skripts? Or in one skript but other commandsRemove `_`s from `{_loc1}` and `{_loc2}` to make them global variables. `_` means it's local variable and those are only available in local scope.
command /test:
trigger:
if {loc2} is greater than {loc1}:
set {a} to x coord of {loc2} - x coord of {loc1}
set {b} to y coord of {loc2} - y coord of {loc1}
set {c} to z coord of {loc2} - z coord of {loc1}
set {V} to {a} * {b} * {c}
else if {loc2} is less than {loc1}:
set {a} to x coord of {loc1} - x coord of {loc2}
set {b} to y coord of {loc1} - y coord of {loc2}
set {c} to z coord of {loc1} - z coord of {loc2}
set {V} to {a} * {b} * {c}
else if {loc2} is equal to {loc1}:
set {V} to "0"
send "%{V}% blocks found!"
command /loc1:
trigger:
set {loc1} to target block's location
command /loc2:
trigger:
set {loc2} to target block's location
command /test:
trigger:
set {a} to x coord of {loc2} - x coord of {loc1}
set {b} to y coord of {loc2} - y coord of {loc1}
set {c} to z coord of {loc2} - z coord of {loc1}
set {V} to {a} * {b} * {c}
send "%{V}% blocks found!"
command /loc1:
trigger:
set {loc1} to target block's location
command /loc2:
trigger:
set {loc2} to target block's location