[Open Assets] Speedrun Timer

This content may be freely modified and/or maintained by anyone.
Status
Not open for further replies.
This is different from the regular in-game timer. No, it's not a timer soc. It's a global timer that runs independent of level time and anything else, can set a goal for you, and stop on command like an ordinary speed-run clock. No this is not a direct replacement for actual timers like WSplit or Llanfair. This timer uses playtime, which excludes loading times, lag, and intermissions (although this will soon be selectable)

CVars:

bootrun <Off/On>
- When turned on, this will start a run on the first level you play. This is the only way to start a run from the main menu as of yet. Once you start a run via this command, bootrun will turn itself off again, and let you play the run.

autosplit <Off/On> - When turned on, this will automatically make a split for you at the end of every level. this does not FINISH your run for you! You still need to use the done command to tell the script you completed your run.

Commands:

speedrun <0-3>
- By default, this is set to 0, which means it's idle. If you use a value of 1, it starts a run immediately. Using 2 is identical to 1, except it will start the run on next map change. 3 is also like 1, but it will start the run when you use your movement controls. When a run is started, speedrun will be changed to 1. When the run starts, an attempt will be added to the attempt counter.

setgoal <String> - This lets you set the goal below the timer, in case you're streaming or want to be reminded of what you're doing. Changing the goal resets the attempt counter.

done - This finishes the current run. Your time will be paused, and you can record it and relax.

undone - Does the reverse of done. It will un-pause the timer, and update it for the time spent between using done and undone. Useful in case you accidentally used the done command.

resetrun - Does what you expect. It resets the timer and death counter back to zero so you can start the run anew. It does not clear the attempt counter.

splitrun - Also does what you expect. This manually saves a split at this current time immediately.

Also, this script is multiplayer-safe (except for dedicated hosts) so if you ever wanted to have that Co-Op speed-run, you now can. Only the host or the server can change the timer settings or start/stop a run.

At the end of the run, you'll be given a breakdown of how you did, as well as a complete list of your split times. Feel free to check the console or log when you want to.

To be added:

  • Working splits(DONE)
  • Setting the goal from the menu.
  • Run saving with I/O
 

Attachments

  • timer.lua
    12 KB · Views: 601
Last edited:
This is pretty cool, and I can see some nice usage for it if you just wanted to speedrun the game without any external tools.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top