Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Questions]StateChangeSound and traineditor2 changes on new version #1111

Open
Hotapn opened this issue Jan 22, 2025 · 5 comments
Open

[Questions]StateChangeSound and traineditor2 changes on new version #1111

Hotapn opened this issue Jan 22, 2025 · 5 comments

Comments

@Hotapn
Copy link

Hotapn commented Jan 22, 2025

[Object]
Position=0,0,0
states=x.csv,xx.csv
StateFunction = if[leftdoorstarget==1 & distance <8,0,1]

[StateChangeSound]
FileNames = PDO.mp3,PDC.mp3
Position = 0,0,0

The meaning of this StateChangeSound is to play the buzzer sound for the opening and closing of the platform screen doors. This animation works normally in version 1.11.0.8. However, in versions above 1.11.0.8, regardless of whether the door is closing or opening, the StateChangeSound only plays the audio for door opening (i.e., PDO.mp3).


[Object]
Position=0,0,0
states=x.csv,xx.csv
StateFunction = if[leftdoors & distance <9,0,1]

[StateChangeSound]
FileNames = Yuancun.mp3,0.mp3
Position = 0,0,0

The meaning of this StateChangeSound is that when the platform screen door opens, Yuancun.mp3 will be played, and when the platform screen door closes, Yuancun.mp3 will not be played. This animation functions properly in version 1.11.0.8. However, in versions higher than 1.11.0.8, when the platform screen door closes, StateChangeSound will play Yuancun.mp3 one more time.


[Object]
Position=0,0,0
states=x.csv,x.csv,x.csv,x.csv
StateFunction = if[distanceStation[10]<1200 & distanceStation[10]>1190 & reverserNotch==1,0,-1]

[StateChangeSound]
FileNames = Platform3.mp3
Position = 0,0,0

The meaning of this StateChangeSound is that when the train is 1190 to 1200 meters away from the next station, Platform3.mp3 will be played once. This animation worked normally in version 1.11.0.8. However, in versions higher than 1.11.0.8, the audio is not played.


I want to change the carriages of the power car through traineditor2. However, when I save the file and open it again, the carriages of the power car have not been changed.Here are a video.

@Hotapn
Copy link
Author

Hotapn commented Jan 22, 2025

1.1.mp4

@leezer3
Copy link
Owner

leezer3 commented Jan 22, 2025

With number 4:
You're using the train.dat (old) format to export.
This doesn't allow manual setting of motor cars.

Export in XML format for this to work correct.

@Hotapn
Copy link
Author

Hotapn commented Jan 23, 2025

With number 4: You're using the train.dat (old) format to export. This doesn't allow manual setting of motor cars.

Export in XML format for this to work correct.

Image

but there is only old format, I can't found XML format on train setting manual

@leezer3
Copy link
Owner

leezer3 commented Jan 24, 2025

OK, you're right.
I thought that had been implemented, but TE2 is currently unfinished.

With your others:
This is because I'd used true as the default for PlayOnShow /PlayOnHide, but it'd got changed (accidentally) to false when the new parser got implemented.
It probably comes under the category of undocumented quirks (as it would have worked correctly with both explicitly specified), but it should now work as previously.

leezer3 added a commit to leezer3/OpenBVE-Documentation-Hugo that referenced this issue Jan 24, 2025
@Hotapn Hotapn closed this as completed Jan 25, 2025
@Hotapn Hotapn reopened this Feb 6, 2025
@Hotapn
Copy link
Author

Hotapn commented Feb 6, 2025

OK, you're right. I thought that had been implemented, but TE2 is currently unfinished.

With your others: This is because I'd used true as the default for PlayOnShow /PlayOnHide, but it'd got changed (accidentally) to false when the new parser got implemented. It probably comes under the category of undocumented quirks (as it would have worked correctly with both explicitly specified), but it should now work as previously.

I found number 1 and number 2 problems remain exist on v1.11.1.3.

Number 3 has changed to the following situation : Platform3.mp3 was played twice when distanceStation[10] ==1200 and distanceStation[10] ==1190

And when the train "1190 <= distanceStation[10] <=1200", it will also play once when the reverserNotch changes from 1 to 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants