Check Position of Audio

Get help using Construct 2

Post » Wed Apr 17, 2013 1:00 am

Hello guys! First of all, sorry for the english!

I was wondering how to get a condition like this :

If
Position of an Audio playing is > 15 and < 20
+
Press P

Do something

But i can't find a way, with the original plugins, to check the position of an audio file. If a storage a variable thats add 1 to every second passed from the time i play a song, it can cause some lag problems and other stuffs... Is there any other way?

Thanks for the help!hcdjp2013-04-17 01:05:28
B
5
Posts: 5
Reputation: 560

Post » Wed Apr 17, 2013 2:22 am

Doing this only works when you have the Web Audio API, which is not enabled on all browsers. If it's enabled, I think it's something like audio.playbacktime("tag").
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed Apr 17, 2013 2:43 pm

Try using 'compare values' in the System object and comparing the playback time. (It ought to work without the Web Audio API...)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Wed Apr 17, 2013 5:19 pm

Hello Ashley!

When i use the "Compare two values" condition, i can't acess anything from the Audio plugin! Is there something i am mistaking?

When i write audio.PlaybackTime("inicial"), i got "Playback time is not a an expression variable in "Audio"

i'm using r119!

Thanks for the support!hcdjp2013-04-17 17:40:03
B
5
Posts: 5
Reputation: 560

Post » Thu May 23, 2013 11:15 pm

^ r119 is a outdate version and audio plugin don't has those stuffs.
B
8
S
1
Posts: 5
Reputation: 760


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 22 guests