Add this to a prefab and spawn it inside the detention level using:
// Shrink mechanism builder.AddEnvironmentEffect(EffectType.ShrinkZone, interval: 5f);
public void BuildDetentionMaze() { var builder = new LevelBuilder("DetentionMaze", 20, 20); builder.FillWithTile(TileType.Brick); // Spiral maze pattern for (int i = 0; i < 40; i++) { int x = Random.Range(1, 19); int z = Random.Range(1, 19); builder.SetTile(x, z, TileType.Hall); } baldi dev api
Call this in OnModLoad . Make a moving “Principal’s Shadow” that speeds up each time you hit a wrong answer inside detention :
private void StartDetention() { wrongStreak = 0; BaldiGameManager.TeleportToCustomLevel("DetentionMaze"); } } Create a new scene (or procedural map) using the API’s LevelBuilder : Add this to a prefab and spawn it
private bool IsPlayerInDetention() { return BaldiGameManager.CurrentLevelName == "DetentionMaze"; } }
using BaldiAPI; using UnityEngine; [BaldiMod] public class DetentionDimensionMod : ModBase { public override void OnModLoad() { Events.OnWrongAnswer += OnWrongAnswerStreak; } i++) { int x = Random.Range(1
public class PrincipalShadow : MonoBehaviour { public float speed = 2f; private int speedIncreaseCount = 0; void Start() { Events.OnWrongAnswer += () => { if (IsPlayerInDetention()) { speedIncreaseCount++; speed = 2f + (speedIncreaseCount * 0.5f); } }; }