[Project folder uploaded below]
Hi guys, here’s my situation:
When I clicked the “start” button, scene1 is changed immediately to scene2 without the animation and sound happening. How to solve this?
What I wanted to do is to change scene after the animation(normal to pressed to normal) and sound are played once when the “start” button is pressed.
My project2.zip (29.8 KB)
I think you should add “wait for the current animation of” button" to finish"
Hi there, thanks for reply.
I tried it, doesn’t work either. The scene is changed immediately.
It seems that the action to set the button animation is missing the operator symbol, right now it says “Do 1 to the number of current animation of Button”, it should say something like “Do = 1 to …”
Also, the second event shouldn’t be a sub-event but a separated one, otherwise you’re asking that the animation and music have finished at the same time you do a click ( it may work but will need two clicks on the button: the first one to start the animation and the second when the animation and music have finished).
By the way, make sure the button animation 1 is not on loop
Hi, Lizard-13, thanks for reply.
I have made progress. With this modification, the animation and the sound will run at the same time when I click the button but it does not change the scene. Any idea? Sorry if I disturb your study.
And if I delete the “Left mouse button is released” condition, the scene changed without playing animation and sound. It is as if it disregard the conditions.
With this modification, I get the effect I wanted and from what I understand:
1st standard event:
If I clicked the button, animation is played and timer “clicked” is started.
sub-event to 1st standard event:
Music will play immediately after parent’s event played the animation and started the timer.
Because computer runs so fast, it seems as if the both happened at the same time.
2nd standard event:
Once the three conditions are true, the scene is changed
Here’s where I am bugged, if I removed the first two conditions, the scene is changed after 0.5s by itself. This means the timer condition is obeyed.
However, in order for the 3rd condition to be true, I have to click the button in the first place but I didn’t.
So what is happening, why is the timer started when the button is not clicked? Or should I just be glad I got what I wanted and leave it alone?
and I am confused about the conditions in the 1st and 2nd standard events.
In the 1st std event, I didn’t use “&” but I did for the 2nd std event.
What’s the difference? It looks like as if it is the same thing.
By default all conditions need to be true so you don’t need to use the ‘&’ block on it own inside a standard event. You want to use it most likely inside an OR ‘||’ block in more complex scenarios.
If [this OR [this AND this ]]is true then do something
Got it, thanks, ddabrahim!