Changing one actor to another
raciukas22
Member, PRO Posts: 47
I would like to create a game where user clicks on buttons in the same scene. If user clicks on one button images seen in the seen get destroyed and new images appear. Once user clicks on another button new images get destroed and the destroyed images appear again.. And it keeps changing everytime user clicks on buttons. Images include animations and should be spawn in front of other images, therefore images below should be not visible anymore. Thanks a lot. I hope i could explain what I mean.
Comments
If you're new to GameSalad, I recommend reading and watching various tutorials to get yourself up to speed. Once you've done that, you should be able to make use of some very good trivia tutorials that should be similar to what you described: http://gshelper.com/woocommerce-search/keyword/trivia/search-in/product/cat-in/all/search-other/product.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks a lot for your reply, but they s is not what I meant. I was having somethink like changing images. For instance changing colours of actors like water moving changes colour into different colours everytimenuser clicks a button. I can spawn actors in front but I want the image below to be not visible anymore. If I set image to destroy it will not restore again once user clicks again on a button to make it visible. Thanks a lot
I am creating a game where there are four different buttons anf 4 different animated characters. Everytime user clicks on one of the buttons animated characters change their appearance. I know I can spawn actors but if I destroy the current actor and want it to be visible again after a button is clicked by user it does no appear again. Tried to change alpha but once I make it to 0 it stays that way. Thanks a lot.
If you destroy an actor, it is gone and must be spawned again. So don't destroy them. Just change their self.Color.Alpha to 0 and if necessary, disable any rules you don't want running while they are "destroyed". Then change self.Color.Alpha to 1 when they need to reappear (and enable those rules if necessary).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks a lot. Thats what I did. Everytime user clicks on button it changes game.attribute+1 and actor is spawn, but then when I click another button it changes game.attribute2+1 actor changes alpha to 0 and when button is clicked again alpha should increase to 1 but it stays 0
If you could post your rules it would be easier to give you some idea where the problem is.
Put a Display Text in the actor with self.Color.Alpha in the expression. What does the actor show for that value when it's visible and when it isn't?
And yes, post a screenshot of your rules.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
/merged threads
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
In actor do you have change attribute to 0?
Everytime it's spawned it will change attribute back to 0. Just a guess.
Your using 2 different attributes to control alpha? Use only one. Hard to grasp what you are doing.