Solved No living entity in a periodical event issue

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

BluecapMc

Member
Aug 5, 2021
4
0
1
20
I was trying to make something that allows the player to froze a skeleton when they look at it. This is the skript that I have for now. Unfortunately, when I reload the skript, it always says that "there's no living entity in a periodical event". I have no idea how to fix that, do I need to loop the skeleton as well?? If so how should i do that.

every tick in "world":
loop all players:
if loop-player's targeted skeleton is set:
apply slowness 255 to targeted skeleton for 1 second
 
Hello, you shouldn't use the "every tick" event because it's too laggy so you can make it loop all the players every 1 second instead. You can do this if you want them to freeze the skeleton for as long as they are looking at it:
Code:
every second in world "world":
    loop all players:
        set {_e} to loop-player's target entity
        if {_e} is a skeleton:
            add "{NoAI:1}" to nbt of {_e}
            wait a second
            add "{NoAI:0}" to nbt of {_e}
I was trying to make something that allows the player to froze a skeleton when they look at it. This is the skript that I have for now. Unfortunately, when I reload the skript, it always says that "there's no living entity in a periodical event". I have no idea how to fix that, do I need to loop the skeleton as well?? If so how should i do that.

every tick in "world":
loop all players:
if loop-player's targeted skeleton is set:
apply slowness 255 to targeted skeleton for 1 second
 
Last edited:
Hello, you shouldn't use the "every tick" event because it's too laggy so you can make it loop all the players every 1 second instead. You can do this if you want them to freeze the skeleton for as long as they are looking at it:
Code:
every second in world "world":
    loop all players:
        set {_e} to loop-player's target entity
        if {_e} is a skeleton:
            add "{NoAI:1}" to nbt of {_e}
            wait a second
            add "{NoAI:0}" to nbt of {_e}
It works, thank you!
 
Status
Not open for further replies.