IVeve Posted July 14, 2021 Share Posted July 14, 2021 Hi, I'm trying to make a global event that happens every 2 hours. What is the most efficient way of doing this? I had the thought of running an autorun event with a wait command of 2 hours, but I'm not sure what sort of load that puts on the server. Link to comment Share on other sites More sharing options...
1 Cheshire Posted July 14, 2021 Share Posted July 14, 2021 You wouldn't directly CALL the common event. Â Basically, you'd want to have a common event that triggers off of changing a variable to do what you need to do. Then in your API script you change that variable every time you want to trigger the common event. Link to comment Share on other sites More sharing options...
0 Cheshire Posted July 14, 2021 Share Posted July 14, 2021 In all honesty, I would suggest leveraging the API for timed stuff. The wait timer is unreliable as it resets every time the server restarts. (So one day it could trigger at 2:00 and the next day at 3:12 because of a restart) Â You could have it trigger based on a variable changing, and use the API to change said variable on a set two hour timer through an external call. This will always be timed correctly because an external source other than the server is keeping track. You also wouldn't be telling the server to keep an event active and checking for the wait timer constantly. Link to comment Share on other sites More sharing options...
0 IVeve Posted July 14, 2021 Author Share Posted July 14, 2021 Programming the timer's easy enough, but could you give me some pointers on how to hook it up, so that it calls one of the common events? Link to comment Share on other sites More sharing options...
Question
IVeve
Hi, I'm trying to make a global event that happens every 2 hours. What is the most efficient way of doing this? I had the thought of running an autorun event with a wait command of 2 hours, but I'm not sure what sort of load that puts on the server.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts