Quick answer: Use a global flag to spawn instances only on first room enter, not in Room Start of a persistent room.

Persistent room with creation code spawning enemies. First visit: 5 enemies. Revisit: 10. Code ran twice while room remembered the first set.

The Fix

// Room Creation Code
if (!global.spawned_room_1) {
    repeat (5) instance_create_layer(irandom(room_width), irandom(room_height), "Instances", obj_enemy);
    global.spawned_room_1 = true;
}

// Or simpler: place instances in editor and skip creation code

Place instances in the room editor; persistent flag preserves them on revisit. Procedural spawn requires the global flag.

Verifying

Leave room. Return. Same enemies, no doubling. Without flag: spawn count grows.

“Editor places. Or guard creation. No doubles.”

Related Issues

For instance_deactivate_region, see deactivate. For particle on instance, see particle.

Guard spawn. No double.