Unfortunately, there is one flaw:
When you RE-enter Testing_Room, it spawns two, Player_1 objects, rather than just one...
This is what I assumed:
I notice that they spawn at different coordinates, so there must be two different 'instance_create(x,y,Player_1)' lines of code that get executed in Testing_Room. One spawns at (150,150), and that is the one I want to be spawning, so it just leaves the other one, which is approximately at (50,50).
So I looked for any other line of 'instance_create(x,y,Player_1)' in any place that might be linked to Testing_Room in some way at all.
I found one line of the exact code I was looking for, but only, it doesn't make any sense where it is...
The one like, 'instance_create(50,50,Player_1)' is in the "Begin Single Player" object. This object is on the main menu, and when you left click it, it brings you to Testing_Room, and creates an instance of Player_1 at (50,50)
However, this is ONLY executed once, when the player clicks the object, and the object is ONLY located on the main menu.
Other than that line, the only other code that creates an instance of Player_1 is in the 'Door' Script, and that creates one at (150,150), so that is obviously not creating the one at (50,50)
The room is NOT checked persistent, and neither are any of the objects. (In other words, nothing is persistent.)
Anyone got any ideas?
EDIT: Also, if you can't figure out what's wrong, then maybe a way to simply limit the amount of 'Player_1' objects in a room, then that might serve as a good temporary solution.
EDIT AGAIN: While trying to fix the problem myself, and through playing around with different set ups, I'm finding that everytime you go through a door, it creates another instance, in addition to the instances it was already going to create.
Edited by CorruptionEX, 25 April 2012 - 12:23 AM.











