boss_flow_control.nut
A poor man's coop_boss_spawning, read the notes and comments for important caveats
/*------------------------------------------------------------------------------------------ boss_flow_control.nut author: Lee Pumphret https://www.leeland.info A script to control boss spawning determined by survivor flow. It's not quite equivalent to coop_boss_spawning as there is no guarantee that the boss will spawn within that flow, just that it'll be possible. You could also modify it to set TankLimit and WitchLimit as needed instead of general boss prohibition. NOTE! - If you want this to be active over an area that invokes multiple director scripts, you must include the code in all of them, otherwise it gets wiped when the next script begins. ------------------------------------------------------------------------------------------*/ // You need to set the following. Flow returned isn't as a percentage, you'll need to adjust // for your map, you can use current_flow_distance to determine where you are in map ::MinTankFlow <- 1000 ::MaxTankFlow <- 100000 function Update(){ DirectorOptions.TankCheck() } DirectorOptions <- { DBG = 0 // debugging. set to true value for spew ProhibitBosses = false function TankCheck() { //enable,disable tank/witch as appropriate if (DBG) printl("GetFurthestSurvivorFlow() = " + Director.GetFurthestSurvivorFlow()) if (Director.GetFurthestSurvivorFlow() > ::MaxTankFlow){ if (DBG) printl("too late for tank"); ProhibitBosses = true } else if (Director.GetFurthestSurvivorFlow() < ::MinTankFlow){ if (DBG) printl("too early for tank"); ProhibitBosses = true } else { if (DBG) printl("tank time!"); ProhibitBosses = false; } } }