[DiscordArchive] Is it possible to schedule an event to happen f...
[DiscordArchive] Is it possible to schedule an event to happen f...
Archived author: stoneharry • Posted: 2024-12-18T19:23:24.424000+00:00
Original source
The server side code should be the same as a GM command
Archived author: Drikish • Posted: 2024-12-18T19:24:08.649000+00:00
Original source
Yeah its not actually meant to be sent to one player only the goal is to send it to the entire server and the server sends the updated packets to all players
Archived author: Drikish • Posted: 2024-12-18T19:24:33.533000+00:00
Original source
timeout happens after X time to then make time go at normal speed again
Archived author: stoneharry • Posted: 2024-12-18T19:25:11.204000+00:00
Original source
just a case of iterating over all players instead of fetching 1
Is this map wide or server wide?
maps are updated on a different thread to general server stuff, more performant
but you want to check the world update timer -- it constantly checks if X time has passed then do Y -- you basically want the same sort of thing for your event
Archived author: Drikish • Posted: 2024-12-18T19:25:11.419000+00:00
Original source
So I was thinking set an event up in DB thats scheduled to occur at whatever times and then if that can trigger a script that does this, and then again handles setting the time back to normal after its initialised after X seconds
Archived author: Drikish • Posted: 2024-12-18T19:25:33.491000+00:00
Original source
Its map wide
Archived author: stoneharry • Posted: 2024-12-18T19:25:46.899000+00:00
Original source
add a map::OnUpdate handler
Archived author: stoneharry • Posted: 2024-12-18T19:26:05.122000+00:00
Original source
if (event and timeSinceEvent >= 5000) {
event = false
do stuff
}
Archived author: Drikish • Posted: 2024-12-18T19:26:22.216000+00:00
Original source
But do this in an event script you mean rather than GM Command?
Archived author: Drikish • Posted: 2024-12-18T19:26:53.993000+00:00
Original source
So that context is not lost