More than 1 entity selected

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

Radyguy

Member
Nov 1, 2023
4
0
1
21
code_language.skript:
command /near:
    trigger:
        loop mobs in radius 5 of player:
            set {target} to loop-mobs
            remove player from {target}
            set {Place} to {target}'s location
        if {target} is set:
            teleport {target} 10 above {Place}
            delete {target}
            delete {Place}
            stop

This is my code and it does work, the only problem how ever is that it can only select 1 entity at a time which is annoying since this is meant to be a command that sends playerS away for a brief amount of time.
 
code_language.skript:
command /near:
    trigger:
        loop mobs in radius 5 of player:
            set {target} to loop-mobs
            remove player from {target}
            set {Place} to {target}'s location
        if {target} is set:
            teleport {target} 10 above {Place}
            delete {target}
            delete {Place}
            stop

This is my code and it does work, the only problem how ever is that it can only select 1 entity at a time which is annoying since this is meant to be a command that sends playerS away for a brief amount of time.
use the words 'entities' instead of mobs.

Code:
loop all entities in radius %integer% of player:

also, it will most likely always have this issue.
 
Well is there any way for it to not have that issue, because I did what you said and it selects the player, then unselects the player and since it only fits 1 entity nothing happens
 
Well is there any way for it to not have that issue, because I did what you said and it selects the player, then unselects the player and since it only fits 1 entity nothing happens
Maybe try adding the word 'all'? If it's not that idk
 
Where? I am kinda new to skript and so Im not sure wdym by that, where do I put all