How to avoid unload entities?

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

NewbyZ

Member
Jan 26, 2017
75
2
0
25
How can I prevent entities from "ceasing to exist" when the chunk is unloaded?
Example:
code_language.skript:
while {_entity} exists:

At the moment that the chunk is unloaded, skript no longer recognized the entity even if it loaded again

EDIT:

Of moment it seems that this works, if someone has something better that, tell it please :emoji_slight_smile:
code_language.skript:
        while {_entity} is alive:
            set {_l} to location of {_entity}
            load chunk at {_entity}
            wait 1 tick
 
Last edited:
How can I prevent entities from "ceasing to exist" when the chunk is unloaded?
Example:
code_language.skript:
while {_entity} exists:

At the moment that the chunk is unloaded, skript no longer recognized the entity even if it loaded again

EDIT:

Of moment it seems that this works, if someone has something better that, tell it please :emoji_slight_smile:
code_language.skript:
        while {_entity} is alive:
            set {_l} to location of {_entity}
            load chunk at {_entity}
            wait 1 tick

Might be better To use the on chunk unload: event then looping entities in that chunk And if iT is THE requested entity cancel event
 
Status
Not open for further replies.