:
Destination Time
:
Present Time
:
Last Time Departed
Sign in to follow this  
Flux Capacitor

Coding problem

Recommended Posts

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

First of all:

Wrong section.

Second:

You call a function inside of a condition, that wont work :P.

Share this post


Link to post
Share on other sites

Call the function at the right position :P.

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
Sign in to follow this