C
Cartoonicus
Guest
This is the most bizarre situation.
I have an animation I want to play as long as a certain sound file is playing. Let me see if I can explain my programming in D&D.
Create Event:
Assign Variable: radio_channel = 0
Set Animation Speed = 0
Set Sprite: anim_radio = 1
Step Event:
If audio is playing: snd_radio0
Set Animation Speed = 1
Set Sprite: anim_radio = 1
-
Else:
Set Animation Speed = 0
Set Sprite: anim_radio = 1
Left Released:
If Variable: radio_channel is = 0
Play Audio: snd_radio0
(The reason I'm doing this in variables is because I want to end up with multiple sound files that will play in order)
So you see, when the player clicks on a button, if the variable: "radio_channel" is zero, the audio file "snd_radio0" should play from start to finish. Then in the step event, if the audio file "snd_radio0" is playing the animation: "anim_radio" should play and loop as long as "snd_radio0" is playing, then stop. However, instead the animation waits until the audio file has completely finished playing, to start, then loops forever.
What the heck am I missing?
What order does a step event happen in relation to a mouse click. I have an audio file that playson a mouse release and an animation that's supposed to play when the step event asks if the Audio file is playing but instead the entire sound file plays and THEN the animation starts.
I have an animation I want to play as long as a certain sound file is playing. Let me see if I can explain my programming in D&D.
Create Event:
Assign Variable: radio_channel = 0
Set Animation Speed = 0
Set Sprite: anim_radio = 1
Step Event:
If audio is playing: snd_radio0
Set Animation Speed = 1
Set Sprite: anim_radio = 1
-
Else:
Set Animation Speed = 0
Set Sprite: anim_radio = 1
Left Released:
If Variable: radio_channel is = 0
Play Audio: snd_radio0
(The reason I'm doing this in variables is because I want to end up with multiple sound files that will play in order)
So you see, when the player clicks on a button, if the variable: "radio_channel" is zero, the audio file "snd_radio0" should play from start to finish. Then in the step event, if the audio file "snd_radio0" is playing the animation: "anim_radio" should play and loop as long as "snd_radio0" is playing, then stop. However, instead the animation waits until the audio file has completely finished playing, to start, then loops forever.
What the heck am I missing?
What order does a step event happen in relation to a mouse click. I have an audio file that playson a mouse release and an animation that's supposed to play when the step event asks if the Audio file is playing but instead the entire sound file plays and THEN the animation starts.