Spawning Actor Problem - Any Pro's know how I can integrate this spawner better?
Hi, so I have a spawner actor in 6 different places inside my app in the game scene. It's pretty simple;
a friendly image spawns (change image) and is touched, you gain +1 towards your score.
an enemy image spawns (change image) and is touched, you lose.
The problem I'm having is with the transition speed of the images.
When I touch a "friendly image", in one spot of the app, and then I see another friendly image in a different place on the app to touch it and gain +1 score, it rapidly changes to the "enemy image" and I lose.
Also, it changes images from the friendly image, to an enemy image, without going back to the transparent self image.
What I want to do, is have a transition time, say if the self.image is not "friendly image" for x seconds, change image to "enemy image"
The problem with my app is it's just not optimized well right now.
If anyone knows how I can make the transition speed smoother, so it doesn't go from the "friendly image" and abruptly changes to the "enemy image" please help me out.
I have looked everywhere and can't seem to find a solution to my problem.
TLDR; I basically just want a downtime from my spawner. I don't want it to be able to change from a friendly image that can be touched, to an enemy image that isn't supposed to be touched, in 0.2 seconds. I want there to be a pause in between the image changing.
Comments
You can use a Timer set to After 0.2 seconds and put the Image Change behavior inside the timer.
It's not really clear from your description how your rules are set up so if that's not a solution then post more specific information about how you are doing all of that or post a screenshot of your rules.
Also, the only thing that can spawn in GameSalad is an actor. I know what you meant (I think) but it's confusing to read that an "image spawns" because I'm not sure if you mean that you are changing the image of an existing actor, spawning a new actor with a preset image, or spawning a new actor and then changing the image. And how/when are you destroying the actors?
By the way, it's also possible to "recycle" actors by moving them and changing their images without actually spawning or destroying them.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User