Game Development Community

playaudio() or axlplay()?

by Erik Madison · in Torque Game Engine · 12/02/2002 (7:19 pm) · 2 replies

What would be the reasons for using either of these, or does it matter? They are both used here and there in the code, yet I can't fathom why one is chosen over the other.
Playaudio has a channel parameter, which I think is what I want, yet just about everything in the engine source is using axlplay. Don't those sounds need a channel?
I'm asking these because I'm having problems with sound, which seem somewhat related to all the other unsolved sound troubles permuting the forums. I think I can track them down, but first I need a better understanding of the core.

#1
11/28/2004 (1:47 pm)
Bump... I don't know this either
#2
11/29/2004 (10:13 pm)
PlayAudio() is a serverside function where as alxPlay() is a clientside function.

You would use playAudio if you wanted sound to radiate from an object so everyone in range could hear it. Lets say you want a clank sound to be played when you hit a player. You would call %player.playAudio(%slot, audiodatablock); Slot is the mount slot, usually it is 0, I do not fully understand the usefulness of it unless the object is huge but that's not relevant to this discussion. This would cause a sound to be played at the hit players location. The distance is defined by the audio datablock you choose to play.

alxPlay is in script generally used to play sounds while in a GUI such as button mouseover sounds, background sounds at the main menu etc.