Game Development Reference
In-Depth Information
The Key command and all its parameters are inserted into your script.
Once entered, the Keycode becomes inactive and typing in the script
window returns to normal.
All the script commands inside the Key(). . .EndKey statement are run
upon the designated keypress.
Each time the b key is pressed the sound bassnote is played.
On NewFrame
Key (66) <B>
playsound bassnote
End NewFrame
Playing sounds
You can play sounds contained within your Toon3D project directly from
playsound soundname
The soundname is the name given to the sound file in your project and
must be referenced exactly as it appears in the Control Window (case
The sound will be looped indefinitely until it is stopped, if it has its
properties set to loop.
To stop a sound:
stopsound soundname
To stop all sounds:
Each time the m key is pressed the sound music is played, and when the
n key is pressed the music is stopped.
On NewFrame
Key (m)
playsound music
Key (n)
stopsound music
End NewFrame
Search Nedrilad ::

Custom Search