Solved Saving location that contains random number to variable

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

EmPoKa

Member
Feb 5, 2022
2
0
1
16
I've tried to save location in variable but it says "can't understand condition/effect". Is there anyone who can help?
Code:
set {_loc} to location at random number between -500 and 500, 0, random number between -500 and 500 in world "manhunt%arg 2%"
 
Can you send the full code you have?
[doublepost=1644071650,1644071302][/doublepost]Depending on what you wanted, I might have made the base.

Code:
command /manhunt [<text>]:
    permission: sk.staff
    trigger:
        if arg-1 is "manhunt1":
            set {_workaround} to arg-1
            set {_random} to random integer between -500 and 500
            set {_loc} to location({_random}, 0, {_random}, {_workaround})
            teleport player to {_loc}
 
I solved my problem by replacing my code with this:
Code:
set {_loc} to location at random number between -500 and 500, 0, random number between -500 and 500 in "manhunt%arg 2%" parsed as world
 
Status
Not open for further replies.