I'm trying to make an addon, but I discovered that there's no wait() or delay() function. I can't figure out any other way to get my script to yield for a few seconds, and there wasn't a function like that documented on the Wiki. Is there a function that can make a script wait for a few seconds or tics?
Ok so basically
The game runs at 35 tics per seconds, and Hooks will run your functions every tic. (not all Hooks act the same: the PlayerThink Hook will run the function once for every player in game every tic, the MobjMoveBlocked Hook only runs when an object is blocked by something, etc)
With this in mind, you can, for example, create a variable, set it to for example 35 (which will make a delay of 1 second), and decrease it by 1 every frame, and then execute something once it reaches 0.