Courtesy of RAYTEK, who has asked me to upload this on their behalf to make it easy for people to find, the auto_spectate.lua has received quite the update!

Details:
-The player is set to an afk state when motionless for 5 seconds. AFK players will not be spectated.
-Players who have completed the level are not spectated.
-When motionless for 5 seconds (or 2 if the player has cleared the level), a random player will be spectated.
-Spectated player will change every 10 seconds.
-Moving ends the auto spectate state.

Every command is configurable. The new command list is:
- autospec_timer [5] : seconds before spectating a random player while not moving
- autospec_timer_level_completed [2] : same but only for players who has completed the level
- autospec_switch_timer [10] : seconds before switching to another player
- autospec_afk_timer [5] : seconds before a player is considered afk for the addon
- autospec_activate : start spectating a random player immediately.
- autospec_toggle : enable/disable autospec and start spectating a random player immediately if switching from disable to enable.
- autospec [On]/Off : enable/disable autospec without immediately spectating a random player.
So it was brought to my attention that the way I generated random numbers could potentially result in desynchs, so here is an update that attempts to remedy that. The script generates random numbers to determine who to spectate, and now I have added a local variable that gets saved so that should hopefully stop the desynch risk.

Also realized that the afktoggle wouldn't turn off auto spectate because of a typo, fixed now.
Back
Top