Implementing NextRound cheat

Blog Entry Part 1: The Problem
This week, I needed to implement a developer cheat command that would allow instant progression to the next round in our enemy wave-based system. This cheat, SpawnEnemy would be critical for testing late-round balance, AI behavior, and wave scaling without needing to manually play through each wave.
Initially, the issue seemed simple: just destroy all enemies and trigger the next wave. But the underlying complexity of our spawning system made things more complicated. Enemies were not all spawned immediately — instead, they trickled out over time via spawner timers. This meant triggering the next wave too early could break the system, especially if timers were still running or if spawn quotas weren't properly reset.
Blog Entry Part 2: The Solution
To solve this, we developed a custom cheat inside MyCheatManager::NextRound() . The function performs several critical steps to ensure the wave ends cleanly and spawners are fully reset:
-
Iterates over all active enemies using TActorIterator and destroys them.
-
Forces the wave to complete by setting TotalEnemiesKilled = TotalCanSpawn.
-
Accesses all active spawners, clears their spawn timers, and manually resets their state to be ready for the next wave.
-
Only triggers
GameMode->NextWave()if it hasn't already been triggered by natural enemy death count logic, avoiding double advancement.
The Picture attached shows the logic I used to solve the problem
So basically by updating our ABaseSpawner class to expose its internal timer and resetting logic through a new ResetSpawner() function, we gained full control over its behavior — without having to rewrite its internal spawn system.
Get Mechanical Meltdown
Mechanical Meltdown
| Status | In development |
| Authors | QuantexGames, Paratox, IImezzii, Bananarama8910, XsaborZ, Mrr_Memez |
| Genre | Shooter |
More posts
- Devlog 11: Elijah Jackson: Hammer TimeJun 20, 2025
- Devlog 10: Elijah Jackson: Where the animation at?Jun 06, 2025
- Devlog 9: Elijah Jackson: Upgrades People, Upgrades!May 28, 2025
- Devlog 8: Elijah Jackson: What are you aiming at?!May 23, 2025
- Devlog 7: Elijah Jackson: Keep Up The FightMay 22, 2025
- Devlog 6: Elijah Jackson: Now You See MeMay 16, 2025
- Object Pool ImplementationMay 16, 2025
- Devlog 5: Elijah Jackson: AbiliTreesMay 14, 2025
- Devlog 4: Elijah Jackson: I Want *That* WeaponMay 10, 2025
Leave a comment
Log in with itch.io to leave a comment.