How do I play sound when system pick nearest

Get help using Construct 2

Post » Wed Jan 25, 2017 3:04 pm

How fix this event?
https://www.dropbox.com/s/pvtrfu0cwbmqc ... 6.png?dl=0

Expected result
Every time when arrow jump to nearest meteor audio should play sound
B
25
S
8
Posts: 215
Reputation: 2,173

Post » Thu Jan 26, 2017 12:24 am

You'd have to keep track of which meteor was jumped to last and then play the sound if the value changes. For example, store the UID in a global (LastUID):
if( meteor.UID <> LastUID)
-> set LastUID = meteor.UID
->Play sound
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494


Return to How do I....?

Who is online

Users browsing this forum: beohs, brunopalermo and 9 guests