Flux Capacitor 0 Report post Posted December 24, 2009 I'm trying to get a sound to play (Bar_1) when the coils light up :TIME_884 03CF: load_wav 'BAR_1' as 1 // My code :TIME_894 if 80E1: not key_pressed 0 2 jf @TIME_1105 02E3: 1@ = car 0@ speed if 1@ > 48.5 // floating-point values // Coil Light 03D1: play_wav 1 // Added sound jf @TIME_625 Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted December 24, 2009 First of all: Wrong section. Second: You call a function inside of a condition, that wont work . Share this post Link to post Share on other sites
Flux Capacitor 0 Report post Posted December 24, 2009 So what shall I do? Share this post Link to post Share on other sites
Mini-Me 24 Report post Posted December 24, 2009 Call the function at the right position . if and 1@ > 48.5 03D0: wav 1 loaded then 03D1: play_wav 1 end Also a check if the sound is loaded isn't bad in most cases . Share this post Link to post Share on other sites
Flux Capacitor 0 Report post Posted December 24, 2009 (edited) Alright, still doesn't work. Here's what I'm going for: Edited December 24, 2009 by Flux Capacitor Share this post Link to post Share on other sites