Game Development Community

Sound FX

by Travis Vroman · in Torque Game Engine · 07/01/2002 (8:09 am) · 2 replies

Alright.......... another noob question.................. how do you attatch sound files to certain events? Please help! Thanks.....


~Barzahd

#1
07/01/2002 (8:16 am)
Events in which way? Do you mean when entering a trigger or when calling an ::on... function?

There are two functions to play a sound.
ServerPlay2D(%profile)
ServerPlay3D(%profile,%transform)

You can get an objects transform by using %obj.getTransform().

Profiles have to be created and be of this type: AudioProfile

Maybe this helps you.

greetings
Daniel
#2
07/01/2002 (8:28 am)
All right........ for instance.........
When entering water I want a splash sound, when under water I want an ambient sound to loop, and on an interior I want a different footstep sound. I just have no clue how to go about doing this...........


~Barzahd