AttePatte Posted May 4, 2022 Share Posted May 4, 2022 When you loop say.. a zombie yes, when you loop a zombie does the looped zombie get stored to the server memory? And if so, wouldn't it after a while start to lag the server. Ik, pretty dumb question but that's why I'm asking from smart people only. Link to comment Share on other sites More sharing options...
Pryzmm Posted May 4, 2022 Share Posted May 4, 2022 4 hours ago, AttePatte said: When you loop say.. a zombie yes, when you loop a zombie does the looped zombie get stored to the server memory? And if so, wouldn't it after a while start to lag the server. Ik, pretty dumb question but that's why I'm asking from smart people only. take this skript for an example: command /killzombies: trigger: loop all zombies in world("world"): kill loop-entity send "&aAll zombies killed!" It will loop all the zombies in the world with the name "world". Once it loops through all the zombies it forgets about the loop ever happening, not saving any information into the server memory. Here's another example: command /killzombies: trigger: loop all zombies in world("world"): add loop-entity to {Zombies::*} kill {Zombies::*} clear {Zombies::*} send "&aAll zombies killed!" Once the loop is done in this skript, all the zombies will be saved into a variable, where only then will it get saved into a file (variables.csv). Then when it kills the zombies after the loop, it will then clear the variable, removing any data regarding the already dead zombies. 1 Owner of Lifestealed, Exploratory, Encore, UNOfficially and Observed OG [VIP] 12/26/20 - 10/27/2021 OG [PRO] 12/27/21 - 11/18/2022 OG [LEGEND] 11/18/2022 - 3/14/2023 [DEFAULT] 3/14/2023 - 5/8/2024 [MOD] 5/8/2024 - Present Link to comment Share on other sites More sharing options...
AttePatte Posted May 5, 2022 Author Share Posted May 5, 2022 Very clearly explained, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now