How do I compare play sound with globalnumber

Just started using Construct 2? Post your questions here

Post » Wed Jun 24, 2015 7:13 pm

can i compare play sound with global number???
example:
Global number name = "Move"
Global number move = 0
if
move = 1 play sound Awesome not looping at volume 0 db (tag""))
move = 2 play sound Cute not looping at volume 0 db (tag""))

any suggestion to me?? its error with my logic..
sorry for bad english
B
3
Posts: 8
Reputation: 196

Post » Wed Jun 24, 2015 7:24 pm

You play it every tick? Thats real fast... Your sound has a length smaller than 16ms?

I think you need something like:
if move = 1 and not playing currently - play
if move = 2 and not playing currently - play other
if move = 0 and currently playing - stop
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
10
S
4
G
1
Posts: 158
Reputation: 1,303

Post » Wed Jun 24, 2015 7:48 pm

deathangel1479 wrote:You play it every tick? Thats real fast... Your sound has a length smaller than 16ms?

I think you need something like:
if move = 1 and not playing currently - play
if move = 2 and not playing currently - play other
if move = 0 and currently playing - stop




i use global number to move sprite set position to x,y. I made a button to add the global number +1 if tapped and every global number play different sound.. any solution??
btw thanks for reply
B
3
Posts: 8
Reputation: 196


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests