Project Zomboid

Project Zomboid

Lua Timers
27 Comments
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 18 Dec, 2024 @ 12:03am 
@RJ_RayJay :steamthumbsup:
RJ_RayJay 17 Dec, 2024 @ 7:54am 
Hi @𝚅𝚒𝚜𝚑𝚗𝚢𝚊 I was wondering if I may have your permission to include a copy of Lua Timers as a library in a framework I'm making for Project Zomboid, let me know. Thanks!
RJ_RayJay 16 Feb, 2024 @ 2:04pm 
@𝚅𝚒𝚜𝚑𝚗𝚢𝚊 No problem, I'm glad it's fixed now (better late than never xD)
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 16 Feb, 2024 @ 1:39pm 
@RJ_RayJay LOL, you right, I didn't upload it for for almost 2 years. how.. thanks for your notice about that, now it's correct :spiffo:
RJ_RayJay 16 Feb, 2024 @ 11:03am 
@𝚅𝚒𝚜𝚑𝚗𝚢𝚊 I don't see that in the files on my end for this mod, do you have an updated version?
Here's a picture of what I see: {LINK REMOVED}
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 16 Feb, 2024 @ 5:38am 
@RJ_RayJay repetitions check only if `not v.Infinity` (line 58)
RJ_RayJay 15 Feb, 2024 @ 12:46pm 
@𝚅𝚒𝚜𝚑𝚗𝚢𝚊 Yes that's right, I set the repetitions to 0 to run the timer indefinitely but it would only run once in my testing. In your code at line 59 for lua_timers.lua it defines the following:

if v.Repetitions <= 0 then
timer.Timers[k] = nil
end

Since it checks if repetitions is less than or equal to 0, it will remove the timer.
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 14 Feb, 2024 @ 3:42pm 
@RJ_RayJay `Infinity = repetitions == 0`
RJ_RayJay 14 Feb, 2024 @ 12:07pm 
I believe the infinite repetitions does not work. I checked your code and if the repetitions is less than or equal to 0 (which is what it should be for infinite reps) it will remove the timer. Unless I'm missing something in my analysis?
Lemonator 26 Jul, 2023 @ 6:09pm 
This is so fucking useful it saved me so much time with my mod.
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 26 Jun, 2023 @ 2:23am 
@Tomaro yup :spiffo:
Joy Tomaro 25 Jun, 2023 @ 11:11pm 
hi, is it alright if i pack lua timers into a future version of my blackouts mod to reduce dependencies?
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 21 Jun, 2023 @ 9:17am 
@Monkey yup, sure
Monkey 19 Jun, 2023 @ 3:07pm 
Hey! I am humbly asking for permission to include your LuaTimer lua implementation in a mod we're working on to reduce dependencies. With credits of course!
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 29 May, 2023 @ 2:44am 
@GO$HA sure
KetamineRoll 29 May, 2023 @ 1:22am 
Can I get permission to pack these methods into my own mod to reduce dependencies?
Glytch3r 12 Nov, 2022 @ 11:46pm 
dude we already sopke! haha i just didn't know you are Vishnya lol! awsome mod man!
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 12 Nov, 2022 @ 1:05pm 
yea, shot me msg
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 12 Nov, 2022 @ 1:04pm 
Вишня#9999
Glytch3r 7 Nov, 2022 @ 9:49pm 
Hi again can you pls send me a msg via discord i have alot of questions sir..
Like are the function persistent like if you logout and login will it remains?
If not then you think its possible to make them so using moddata?
I might try to do that and send you the code if im able to do so
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 4 Nov, 2022 @ 3:08pm 
sure, np
Glytch3r 3 Nov, 2022 @ 10:52pm 
Can i get permission to add this to a mod so that i dont require it to minimize the dependencies . If its ok. I wil also give you credit.
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 16 Oct, 2022 @ 7:57pm 
added pastebin link in desc
u can check it there
MyNameis_Mati 16 Oct, 2022 @ 6:51pm 
can you give a practical example pls?
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 16 Oct, 2022 @ 4:02pm 
default pz events like `everyhours` or `everytenminutes` not always corresponds to some things
𝚅𝚒𝚜𝚑𝚗𝚢𝚊  [author] 16 Oct, 2022 @ 4:00pm 
it's framework for pz mods developing to do delayed/repeatable actions
MyNameis_Mati 16 Oct, 2022 @ 5:04am 
So what is this mod for? A base for making others?