calling a sound thru a behavior
by rennie moffat · in Torque Game Builder · 04/25/2010 (11:19 am) · 3 replies
HI I had posted ealier about producing, managing sound in games and had made it work. however i have made some new code and the trigger works, on collision. but the audio won't play.
i have a behaviorfield set up so that when the object is triggered, it
this.sound, string is defined as
audio.cs is called in game.cs
What could I be doing wrong?
myfiles are wav and there etc. :::)))
i have a behaviorfield set up so that when the object is triggered, it
alxPlay(%this,sound) ///where %this.sound is a string, in a behaviorfield.
this.sound, string is defined as
new AudioProfile(bkgLoop1)
{
filename = "~/data/audio/music/bkgLoop1.wav";
description = "AudioLooping";
preload = false;
};
///and
///looping as
new AudioDescription(AudioLooping)
{
volume = 1.0;
isLooping = true;
isStreaming = true;
is3D = false;
};audio.cs is called in game.cs
What could I be doing wrong?
myfiles are wav and there etc. :::)))
About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.
#2
05/04/2010 (9:24 am)
1. alxPlay(%this,sound) 2. ///where %this.sound is a string, in a behaviorfield.Line 1 you have a comma not a full stop, is this a typo?
#3
TGB thread
http://www.torquepowered.com/community/forums/viewthread/114783
iTGB
http://www.torquepowered.com/community/forums/viewthread/109425
05/04/2010 (9:30 am)
yes. the problem or relevance is the white noise or static being produced, seemingly in iTGB. TGB thread
http://www.torquepowered.com/community/forums/viewthread/114783
iTGB
http://www.torquepowered.com/community/forums/viewthread/109425
Torque Owner rennie moffat
Renman3000
Are channels completely necessary?