HELP RANDOM TELEPORT

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

MortalsG

Member
Jun 10, 2017
4
0
0
33
Hi!

I need help with a skript I'm creating multiarena:

I want the player to send it to a spawn random

Ex:

Having two spawns and I want you to teleport to one of them

Sorry for my english
[doublepost=1499640887,1499638274][/doublepost].-.
 
You can physically set the spawns to your current position and add them to a list via commands, then, you can choose an random element in that list.

code_language.skript:
command /mArena <text>:
    trigger:
        arg 1 is "setSpawn":
            add location of player to {mArena::spawns::*}
        arg 1 is "spawn":
            teleport player to random element out of {mArena::spawns::*}
 
You can physically set the spawns to your current position and add them to a list via commands, then, you can choose an random element in that list.

code_language.skript:
command /mArena <text>:
    trigger:
        arg 1 is "setSpawn":
            add location of player to {mArena::spawns::*}
        arg 1 is "spawn":
            teleport player to random element out of {mArena::spawns::*}
You can physically set the spawns to your current position and add them to a list via commands, then, you can choose an random element in that list.

code_language.skript:
command /mArena <text>:
    trigger:
        arg 1 is "setSpawn":
            add location of player to {mArena::spawns::*}
        arg 1 is "spawn":
            teleport player to random element out of {mArena::spawns::*}
no found
[doublepost=1499649751,1499645276][/doublepost]
You can physically set the spawns to your current position and add them to a list via commands, then, you can choose an random element in that list.

code_language.skript:
command /mArena <text>:
    trigger:
        arg 1 is "setSpawn":
            add location of player to {mArena::spawns::*}
        arg 1 is "spawn":
            teleport player to random element out of {mArena::spawns::*}

Does not teleport me
 
no found
[doublepost=1499649751,1499645276][/doublepost]

Does not teleport me

Odd; try this then:

code_language.skript:
command /mArena <text>:
    trigger:
        arg 1 is "setSpawn":
            add location of player to {mArena::spawns::*}
        arg 1 is "spawn":
            set {_loc} to a random element out of {mArena::spawns::*}
            teleport player to {_loc}

The teleport effect may just be finicky when it comes to taking a location from a list
 
Odd; try this then:

code_language.skript:
command /mArena <text>:
    trigger:
        arg 1 is "setSpawn":
            add location of player to {mArena::spawns::*}
        arg 1 is "spawn":
            set {_loc} to a random element out of {mArena::spawns::*}
            teleport player to {_loc}

The teleport effect may just be finicky when it comes to taking a location from a list
Thanks, I worked but, How do I remove the {_loc} from a sand Remember it's multi-tier