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 Project Meltdown
Project Meltdown
Status | In development |
Authors | QuantexGames, Paratox, IImezzii, Bananarama8910, XsaborZ, Mrr_Memez |
Genre | Shooter |
More posts
- Devlog 9: Elijah Jackson: Upgrades People, Upgrades!5 days ago
- Devlog 8: Elijah Jackson: What are you aiming at?!10 days ago
- Devlog 7: Elijah Jackson: Keep Up The Fight11 days ago
- Devlog 6: Elijah Jackson: Now You See Me17 days ago
- Object Pool Implementation17 days ago
- Devlog 5: Elijah Jackson: AbiliTrees19 days ago
- Devlog 4: Elijah Jackson: I Want *That* Weapon23 days ago
- Currency Drop System and room restricting31 days ago
- Devlog 3: Elijah Jackson: Moving, Buying, & Changing31 days ago
Leave a comment
Log in with itch.io to leave a comment.