How do I control the time of music?

Get help using Construct 2

Post » Thu Apr 30, 2015 4:00 pm

I need to stop the music at a time ex: 2:03
And after an action start it again at 2:03
B
5
Posts: 31
Reputation: 295

Post » Thu Apr 30, 2015 4:44 pm

use Audio.Duration("tag")
B
97
S
32
G
15
Posts: 1,198
Reputation: 16,178

Post » Fri May 01, 2015 2:56 pm

jobel wrote:use Audio.Duration("tag")

Where do I use it?
B
5
Posts: 31
Reputation: 295

Post » Fri May 01, 2015 3:49 pm

oops I meant PlaybackTime. you can use it any where you can write system expressions..

Try: System Compare two values

First Value: Audio.PlaybackTime("tag")
Second Value: 123

tag is what you named your audio, and the 123 is number of seconds
B
97
S
32
G
15
Posts: 1,198
Reputation: 16,178

Post » Fri May 01, 2015 4:26 pm

jobel wrote:oops I meant PlaybackTime. you can use it any where you can write system expressions..

Try: System Compare two values

First Value: Audio.PlaybackTime("tag")
Second Value: 123

tag is what you named your audio, and the 123 is number of seconds


I try but don't work :(
B
5
Posts: 31
Reputation: 295

Post » Fri May 01, 2015 5:27 pm

when you start the audio are you giving it a tag?
B
97
S
32
G
15
Posts: 1,198
Reputation: 16,178

Post » Fri May 01, 2015 5:34 pm

jobel wrote:when you start the audio are you giving it a tag?


Yes,

Image
B
5
Posts: 31
Reputation: 295

Post » Fri May 01, 2015 5:38 pm

well I wouldn't say equal to exactly "1"..since it's probably not returning a whole number..there are decimals places..

so maybe do round(Audio.PlaybackTime("Historia") or rather >= (greater than or equal) to 1.
B
97
S
32
G
15
Posts: 1,198
Reputation: 16,178

Post » Fri May 01, 2015 6:14 pm

>= 1 and <= 2 thx its work :)
B
5
Posts: 31
Reputation: 295


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests