Switching engine sounds on/off for diesels
#1
Posted 07 January 2015 - 12:33 PM
But there does not seem to be any reaction for diesel-engines on these triggers. I tried various sounds and loops and things, but nothing happens. Probably doing something wrong somewhere, but don't know what.
Does anybody have an example of a sound file with these triggers set that actually works?
Regards,
Rob Roeterdink
#2
Posted 07 January 2015 - 12:54 PM
#3
Posted 08 January 2015 - 09:58 AM
it's not your problem. This feature has been damaged by some change. If you want to check if your .sms files work, you can try with the old release 1819.
I attach here a simply modified gp38eng.sms file for your reference.
gp38eng.zip (2.51K)
Number of downloads: 224
I'll try to find out where the error has been introduced.
#4
Posted 08 January 2015 - 10:05 AM
Regards,
Rob Roeterdink
#5
Posted 08 January 2015 - 12:00 PM
I modified the above file adding two lines with an explicit disable of the Initial_Trigger. This way the things work.
Modified sample file attached
gp38eng.zip (2.76K)
Number of downloads: 223
I attach also the sample poweron .wav file I used
x_gp_poweron1.zip (59K)
Number of downloads: 213
To gpz: This simple stream
Stream ( Priority ( 6 ) Triggers ( 3 Skip( **** The engine/current related sounds - Stream 1 {Xfade} **** ) Initial_Trigger ( StartLoop ( 1 File ( "x_gp_power_cruise1.wav" -1 ) SelectionMethod ( SequentialSelection ) ) ) Discrete_Trigger ( 24 ReleaseLoopRelease () ) Variable_Trigger ( Variable2_Inc_Past 0.050 ReleaseLoopRelease () ) ) )
does not seem to work correctly with release 1836 and up to now. When Y is pressed (motor is stopped) the Initial Trigger is stopped and restarted. If instead I don't insert the third trigger, things work correctly. However both triggers are necessary. The only way to avoid restarting the Initial Trigger is to insert DisableTrigger commands.
Unless the complete .sms file is disactivated (because out of distance) and then reactivated, an inital trigger must not be restarted.
#6
Posted 08 January 2015 - 12:44 PM
But I'll give it another try one of these days and will see what happens.
Regards,
Rob Roeterdink
#7
Posted 08 January 2015 - 10:01 PM
#8
Posted 08 January 2015 - 11:39 PM
Csantucci, on 08 January 2015 - 12:00 PM, said:
I will take a look. :) But, without checking the code, how is it supposed to work? If the camera jumps to a long tran end and back, then the engine sound will be restarted? For me it looks like the DisableTrigger is needed anyway.
Changing this part of code is very dangerous, because the sound state is very unstable. If I change something, maybe something else gets broken, I might not even think of, or don't remember why something was set in a particular way. Not even speaking of the various hacks of MSTS trying to reproduce, and that I hate very much.
#9
Posted 09 January 2015 - 01:04 AM
gpz, on 08 January 2015 - 11:39 PM, said:
Good question. But for sure, if the .sms sound remains within activation distance, the initial trigger must be started only once. Now instead I see in the sound debug interface that the initial trigger sound restarts (with a "New" indication I believe) after its sound has been released.
gpz, on 08 January 2015 - 11:39 PM, said:
I may agree on this. But this is not a question of MSTS' hacks, and a behavior like the actual one is not MSTS compliant, even if no one noticed it up to today :)
#10
Posted 09 January 2015 - 03:24 AM
The B key is used here because it has no normal use in UK MSTS diesel engines.