Save Spawn
tpjacobson
Member Posts: 33
Hey guys I have run into a problem. I have part of my game set up so the actors spawn on a certain rule but when I change the scene the actors that spawned are gone.
Any Help ??
Comments
You'll need to re-spawn the actors in the new scene. During a scene change, the previous scene is flushed from memory and the new scene is loaded.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c well my game is where you tap to build buildings but their is a separate scene for the inventory. Do you have a better way to do this.
I have a free demo that retains spawned actor positions but it was made with Mac Creator so you'll have to convert it: http://www.learngs.com/product/remember-actor-position.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang I tried it and it did not work because you spawn the actors in the game manually. Any other ideas???
Sorry, you're right. I was forgetting that that demo doesn't use tables. You would have to record each spawned actor's position in a table and then Loop over Table (I think that's only in the Mac version but I'm not sure; otherwise, a custom loop or Loop behavior) to spawn each actor again at that position.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Here's another demo I made and although it doesn't remember actor positions, it does show a method of looping over a table and spawning actors.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User