Okay. So like how can I do the event stuff…?
This stuff:
- On server start, set event to the current event on other servers
- event change logic when timer ends
- So should I do random or set seed?
Okay. So like how can I do the event stuff…?
This stuff:
im assuming you want the events to be random and synchronized across the servers at the same time
local Events = {
function()
print("Event 1") -- you define how events work yourself
end,
function()
print("Event 2")
end
}
local function Event(seed)
math.randomseed(seed)
Events[math.random(1, #Events)]()
end
pass Start
variable as the seed for the event function i.e.
Event(Start) -- this variable is defined in the code i sent perviously
if you want for the event to happen even when the server started in the middle of it then you have to call the function once, with Start
as an argument, before the while loop starts