multiple spawn same actor destroy problem "old thread" was a solution found!
Hi all may I point your attention to this now closed thread:
https://forums.gamesalad.com/discussion/2143/multiple-spawn-same-actor-destroy-problem
basically I'm having the same problem and was wondering if a solution was found! the thread is from 2010..
Basic problem is:
"actor/actors are destroyed using an on/off type scene attribute, destroy actors true or false, then when actors are spawned using a similar on off attribute they instantly destroy themselves!
Its really bugging me as Im trying to destroy a set of actors to essentially reset a scene without actually doing a scene reset, "trying to keep my iAds fill rate up with this method"
any insight into this would be most appreciated
best jay
Best Answer
-
tatiang Posts: 11,949
[Going to close this since you have another thread at http://forums.gamesalad.com/discussion/65761/things-about-gamesalad-that-are-bugging-me-but-could-possibly-have-a-solution/p1]
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
I appreciate that you provided the link to the thread and I have some sense of what that thread was about but the quote you gave is really not helpful or clear at all.
Can you describe the problem again? It helps if you give it some context by explaining how the game works and what you're trying to do.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
thanks for the info,
well the scene is set up as follows:
single screen game,
2 scene attributes both booleans: "global destroy" "global spawn"
and another 2 both booleans "game playing" "player dead"
when scene is booted change attributes are set to:
"global spawn true"
"global destroy false"
"game playing false"
"player dead true"
you get the idea I'm sure,
when the scene starts i have a button to spas everything, just to test it out,
button press =
"global destroy false" "timer after 1 second "global spawn true"
now i have my scene with everything where i want it all present and correct.
game starts,
"game playing is true", "player dead is false"
now, when its is game over,
"game playing false" "player dead true" i have a rule to also turn "global spawn to false" as i know unless these booleans are off they won't trigger on etc.
I have a rule set up in a game asset control actor to destroy all required actors when the user presses a retry button.
"button press" change attribute "global destroy true"
now to test spawning the scene again I made a button that when pressed it does the following:
"global destroy false" "timer after 1 second "global spawn true"
what happens is some actors spawn and stay on the screen and some instantly re destroy themselves,
again any help with this would be great but i am thinking game salad can't handle actors spawning and destroying too well, mage moviegoing them and reusing them is best as stated.. its just that i saw a thread from 4 years ago with the same problem with no answer, seems strange that i would have the same problem or it still exists 4 years on! still enjoying using game salad and think its great but how often is the software updated?
Two thoughts: make sure you don't have any unlocked "instances" on the scene. Make a backup copy of your file first, then double-click each actor on the scene and if you unlocked any by accident, click Revert to Prototype); How do your actors destroy themselves? What is the rule condition for that?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User