Now as for recursively triggering changes the following modifications to the script file work well;
Code:
game_manager
{
////////////////////////////////////////////////
// Initialising
// When game starts
spawn
{
// Level initialization
. . .
wait 1500
// TomTom random the house
wait 5000
trigger game_manager random_setup //6 lines moved into a trigger scriptblock called by this line
}
trigger random_setup
{
// original 6 lines moved from game_manager spawn
wm_announce "random setup now!"
accum 0 random 255
trigger game_manager random_floors
trigger game_manager random_walls
trigger game_manager random_crates
trigger game_manager random_grates
//new lines here on...
wait 15000 //minimum 10+ second delay, increase to taste
//console cvar to manually stop the recursion, (can still manually change)
cvar Fritzbot_stop_random abort_if_equal 1
//warn the player
playsound sound/world/alarm_01.wav volume 255
wait 1000
playsound sound/world/alarm_01.wav volume 2000
wait 4000
//recursive call to loop the script block
trigger game_manager random_setup //note: infinite recursion is normally dangerous to the stack
}
. . .
The script block random_setup will now handle the calls to change the 4 types of barriers. It also checks to see if a new console cvar is set to 1. This is to allow the server sysop to stop the infinite random changes in the playfield. If hosting the game open the console (`) and type
/set Fritzbot_stop_random 1 to kill the random barrier changes (manual lever changes still work). Once turned off you have to restart the map to restart random barrier changes.
You can make the changes to a copy of et_headshot.script copied out of the waypoints into fritzbot\maps. You will have to then play using
/sv_pure 0 to use the modified scriptfile versus
/sv_pure 1 to play with the original waypoints.
BTW If you want to support more than 2 possible script files for the same map that can be done by setting a special built in ET cvar.