How do I play a sound at a beginning of an animation?

Just started using Construct 2? Post your questions here

Post » Wed Apr 20, 2016 6:24 am

Hey, I'm trying to have my game play a sound on a beginning of a certain animation. Is there a way to do to so?
B
12
S
2
Posts: 33
Reputation: 714

Post » Wed Apr 20, 2016 7:28 am

Animation "Animation" is playing, Trigger event once = play sound

? :)
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Wed Apr 20, 2016 7:30 am

or
when you trigger the animation you can trigger also the play sound action at the same time (play once).

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Wed Apr 20, 2016 5:33 pm

When I tried either approaches, the sound plays infinity till the animation is over.
B
12
S
2
Posts: 33
Reputation: 714

Post » Wed Apr 20, 2016 6:30 pm

Even with "Trigger once"?
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Wed Apr 20, 2016 8:24 pm

When I did it with "Trigger once", it played the sound after the animation was over.
B
12
S
2
Posts: 33
Reputation: 714

Post » Wed Apr 20, 2016 8:31 pm

It may be an issue with the sound taking a second to load. Have you tried preloading the sound at the beginning of the layout?

Otherwise, can you post a screencap of your events perhaps?
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Wed Apr 20, 2016 10:51 pm

The sound seems to play after the animation, regardless what I do.

Image
B
12
S
2
Posts: 33
Reputation: 714

Post » Thu Apr 21, 2016 4:34 am

Does your sound start with some extended silence (just check in a media player)?
Is the sound file very large or do you have a lot of them?
Is it in the Sounds or Music folder?

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Thu Apr 21, 2016 7:23 pm

fm4fanAT wrote:Does your sound start with some extended silence (just check in a media player)?
Is the sound file very large or do you have a lot of them?
Is it in the Sounds or Music folder?


1. It doesn't start with extended silence.
2. It's only 192 KB, but I do have 14 sounds all together.
3. It's in the Sounds folder.
B
12
S
2
Posts: 33
Reputation: 714

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 4 guests