I have a container for the player and all his parts. When the player overlaps a door object, I change to the next layout and spawn the character in the new layout through an event. This seemed to work fine, but when I looked at the debugger, it retained the character from the previous layout. I figured then that I should destroy the player object when he exits the layout. When I destroy the player object though, it doesn't seem to destroy everything in the container. When I look at the debugger, I can see that there is only 1 player object but multiples of everything else in the container.
Here is a cap file: [url:3k5oxptl]http://louisferina.com/games/AAG_help01.cap[/url:3k5oxptl]
If you debug the cap file, move to the right (by pressing D) and fall down the hole. You'll pass one layout and enter another. Look at the debugger and youll see one Player object (only one because im destroying it on exiting the layout then creating it again on the new layout). However, the other objects in the player container don't get destroyed and there are 3 of each: CameraObject, detectorR, detectorL, and Part_Dust. Shouldn't they be destroyed also? Is there a better way to spawn the player per layout?
Thanks, appreciate any help.