Adding sounds to scripts (1 Viewer)

Status
Not open for further replies.
@Lowlander21 @AD156 As this is your bus, I think you may be able to help. I want to add a sounds for when the Wayfarer TGX goes into standby mode on the Lothian variant of the B9TL. Could you possibly help? I thought that it would be a simple matter of scripting in a sound file to a script but that seems not to be the case. Any help would be appreciated! :)  


Thanks in advance,


-Jacobthebus
 

Road-hog123

An Orange Bus
FF Council
UKDT
Add-on London Team
Dec 10, 2015
2,287
109
3,158
Kent, UK
roadhog123.co.uk
Pronouns
He/Him
Firstly you're going to want to look in the sound config file (Sound/sound_D92_zf.cfg for the B7L) and add a section like the following to it (the bottom is probably fine), filling in the lines with the correct information:


[sound]
TGX_standby.wav
1

[3d]
x
y
z coordinates of where the sound source is
distance fading (I assume to 0 or half volume)?

[trigger]
soundTriggerVariable


Now, to actually trigger the sound to play you need to have (T.L.soundTriggerVariable)at the point that the ticket machine goes into standby. If standby isn't already implemented, you'll have to add a timing variable, each frame add Timegap to it, reset it to 0 whenever a button is pressed and trigger the sound when the time goes over a limit (remembering to have some sort of anti-repeat).


Hopefully this helps. :)
 

Advertisement

Firstly you're going to want to look in the sound config file (Sound/sound_D92_zf.cfg for the B7L) and add a section like the following to it (the bottom is probably fine), filling in the lines with the correct information:



[sound]
TGX_standby.wav
1

[3d]
x
y
z coordinates of where the sound source is
distance fading (I assume to 0 or half volume)?

[trigger]
soundTriggerVariable


Now, to actually trigger the sound to play you need to have (T.L.soundTriggerVariable)at the point that the ticket machine goes into standby. If standby isn't already implemented, you'll have to add a timing variable, each frame add Timegap to it, reset it to 0 whenever a button is pressed and trigger the sound when the time goes over a limit (remembering to have some sort of anti-repeat).


Hopefully this helps. :)

Thanks there, I'll give it a try when I next get a chance :)
 
Status
Not open for further replies.

Users who are viewing this thread

Similar threads