Issue with TrackFollowerFunction in .Animated files
2 posters
Page 1 of 1
Issue with TrackFollowerFunction in .Animated files
I am currently working on making a .Animated object with sound follow the player train. The issue I've come across while doing this is that adding a "TrackFollowerFunction" section to any [sound] section in the .Animated file completely prevents the sound from playing, both with the old and new renderers. However, if I remove the TrackFollowerFunction line, the sounds play perfectly (but they obviously don't move their location). Here is a snipped of the code I am using to achieve the moving sounds. If the sound could play with the TrackFollowerFunction, that would be perfect!
Edit: I just noticed that NYCT_Railer pointed out a similar issue earlier, but that hasn't been addressed.
I am using 1.7.1.6 (And tested on the latest nightly build), and they both have this issue.
Edit: I just noticed that NYCT_Railer pointed out a similar issue earlier, but that hasn't been addressed.
I am using 1.7.1.6 (And tested on the latest nightly build), and they both have this issue.
- Code:
[object]
States = bench.CSV
TrackFollowerFunction = value + ((1/60) * speed)
[sound]
Filename = SiemensPropulsion/motor0.wav
Volumefunction = if[Ceiling[Abs[value + 1 * (speed * 22.3693629)]] >= 1 & Floor[Abs[value + 1 * (speed * 22.3693629)]] <= 85,if[powerNotch > 0,0.9,0],0]
Pitch = 1.0
Position = 0,1.2,0
TrackFollowerFunction = value + ((1/60) * speed)
Re: Issue with TrackFollowerFunction in .Animated files
https://github.com/leezer3/OpenBVE/issues/491
I will try and get to this for the next major version.
At the minute, sounds are absolutely static, and the TranslateX function etc. won't work either.
Should be relatively easy I think, although will need to check that
Edit:
For your use-case, the TrackFollowingObject (tfo), which essentially is a simplistic AI train may actually be better, and works now:
https://openbve-project.net/documentation_hugo/en/routes/xml/trackfollowingobject.html
I will try and get to this for the next major version.
At the minute, sounds are absolutely static, and the TranslateX function etc. won't work either.
Should be relatively easy I think, although will need to check that
Edit:
For your use-case, the TrackFollowingObject (tfo), which essentially is a simplistic AI train may actually be better, and works now:
https://openbve-project.net/documentation_hugo/en/routes/xml/trackfollowingobject.html
Re: Issue with TrackFollowerFunction in .Animated files
I am well-aware of using TFOs (I've implemented quite a few of them), but the reason that I am looking forward to using moving sounds with .Animated is that unlike train.dat/sound.xml, there are (theoretically) absolutely no limitations in how many sounds can play at a time, and the motor sounds can go into much further detail than the train.dat/sound.xml system because .Animated doesn't divide the sound curves into 0.2kph intervals. Additionally, you can use specific functions to define the sounds that the trains will play, something you can't do with train.dat/sound.xml either. Bottom line, I find that there's way more potential with .Animated sound than the current systems for applying sound to trainsleezer3 wrote:https://github.com/leezer3/OpenBVE/issues/491
I will try and get to this for the next major version.
At the minute, sounds are absolutely static, and the TranslateX function etc. won't work either.
Should be relatively easy I think, although will need to check that
Edit:
For your use-case, the TrackFollowingObject (tfo), which essentially is a simplistic AI train may actually be better, and works now:
https://openbve-project.net/documentation_hugo/en/routes/xml/trackfollowingobject.html
P.S., it would be awesome if .Animated objects used in player trains/TFOs could also have support for a [Sound] section. That would save the hassle of applying a TrackFollowerFunction on a route object that must follow a train.
P.P.S.: I already made the entire motor sound configuration (not moving of course) using .Animated alone for the NYCT R160B Siemens subway car on a test route (also featuring a .Animated railgap object which reproduces the railgap sound):
Re: Issue with TrackFollowerFunction in .Animated files
There appears to be another issue with the [sound] section in .animated files. When the object involved is placed into a position in a route other than the starting point, the object is there, but the sound plays at the starting point of the route file instead of the object location, and yet, the functions that control the sound are in fact being influenced where the object is placed. To reiterate, no matter where I place an animated object with sound, the sound only plays at the beginning of the route regardless of where I put the object. Is there any way to fix that?
Similar topics
» [Sound] section in .animated files *for trains* not working
» Objects in an animated container disappear in Routeviewer and OpenBVE after the insertion point of the .animated file
» animated files? here's the info you need!
» Some much needed functions for train .animated files
» Object Viewer crashes when new variables are used in .animated files
» Objects in an animated container disappear in Routeviewer and OpenBVE after the insertion point of the .animated file
» animated files? here's the info you need!
» Some much needed functions for train .animated files
» Object Viewer crashes when new variables are used in .animated files
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum