Stop Mobs Seeing you (Following & Attacking)

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

xCraimax

Member
Aug 15, 2020
1
0
0
23
Hello, i'm creating a Vanish script and i want to stop mobs seeing, following and attacking you. I don't found any Informations about this. I hope somebody can help me :emoji_slight_smile:
 
https://docs.skunity.com/syntax/search/id:181
Try this expression from skellet. This way you wouldnt need a plugin like essentials, though if you are using essentials it'd be easier to just go through it's commands.

One thing though, you'd probably have to account for people joining as they'd still be able to see. So you could keep the vanished players in a list like this for example; {vanishedpeeps::*} and on the join event, loop that list and make them not visible for the joining player too
 
https://docs.skunity.com/syntax/search/id:181
Try this expression from skellet. This way you wouldnt need a plugin like essentials, though if you are using essentials it'd be easier to just go through it's commands.

One thing though, you'd probably have to account for people joining as they'd still be able to see. So you could keep the vanished players in a list like this for example; {vanishedpeeps::*} and on the join event, loop that list and make them not visible for the joining player too

you can just do
Code:
hide player from all players
 
  • Like
Reactions: Wynnevir
Code:
command /vanish:
    permission:op
    trigger:
        if {vanish.%player%} is true:
            delete {vanish.%player%}
            reveal player to all players
            send "&cYou are no longer vanished"
        else:
            set {vanish.%player%} to true
            hide player from all players
            send "&cYou are now vanished"

on join:
    loop all players:
        if {vanish.%loop-player%} is true:
            hide loop-player from all players
 
Status
Not open for further replies.