It'd be pretty neat for each mini-game to have an actual ScriptObject instance of the gamemode (set by the class field in the ScriptGroup definition of it), which would then be used for callbacks and could be used for per-gamemode state.
new ScriptGroup(Slayer_GameMode)
{
class = "MyGameMode";
...
};
function MyGameMode::onRoundStart(%this, %miniGame, ...)
{
%this.clockExplodedThisRound = %miniGame.numMembers > 3;
if (%this.clockExplodedThisRound)
explodeClock();
}
function MyGameMode::onRoundEnd(%this, %miniGame, ...)
{
if (%this.clockExplodedThisRound)
%miniGame.chatMessageAll("\c6You have passed the clockening.");
}
Which would just internally be managed by creating a ScriptObject with class set to the same thing as whatever was specified in the original gamemode declaration.