Set variable to a random block between two locations

  • 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.

Vexio

Active Member
Jan 26, 2017
92
10
8
23
California
Code:
code_language.skript:
                    while {mg.squish.status} = "active":
                        wait 10 ticks
                        set {_blocc} to a random block from {mg.squish.anvilCorner1} to {mg.squish.anvilCorner2}
                        set {_blocc} to anvil
                        chance of 25%:
                            wait 5 ticks
Error:
code_language.skript:
Can't understand this expression: `a random block from {mg.squish.anvilCorner1} to {mg.squish.anvilCorner2}`

Tried searching the forums?: Yes
Tried searching the docs?: Yes

Thanks for anyone that can help me!
 
code_language.skript:
set {_a::*} to blocks between {_pos1} and {_pos2} // or blocks within {_pos1} to {_pos2}
set {_result} to random element out of {_a::*}

Didn't test hope it work :emoji_grin:
 
Status
Not open for further replies.