You should be able to use code like this to add a new monster during gameplay:
const m = makeMonster(x + "," + y);
Game.monsters.push(m)
Game.scheduler.add(m, true)
The variables x
and y
should be set to the position in the level where you want the monster to start.