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
24
S
7
Posts: 208
Reputation: 2,032

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
21
G
220
Posts: 3,648
Reputation: 123,725


Return to How do I....?

Who is online

Users browsing this forum: JarkeyBacon and 8 guests