Add a Sound to an image
by Landixus · in Torque Game Builder · 06/16/2011 (1:24 am) · 2 replies
I want to add a sound to an image, can somebody help me to do this?
I want to place an invisible image that plays a loop sound when player is in range,
for a gearwheel.
Thx a lot
Andreas
I want to place an invisible image that plays a loop sound when player is in range,
for a gearwheel.
Thx a lot
Andreas
About the author
what? I am old :)
#2
06/17/2011 (10:59 pm)
This is was i mmissing in the Editor a simple Sound editor to add some sounds.
Torque 3D Owner William Trevino
Novel
I created a behavior that has two arguments (distance, sound file)
in the behavior it calculates the center of the image and then created a much larger image of length distance with its center at the same point as the center of the original image. Then it uses circle collision and if you collide with that image then it plays the sound with the volume based on the distance way from the center.
like I said this was just me playing around and most likely isn't the best method but maybe it will get you started.