• Welcome to Virtual Transportation Center. Please login or sign up.
 

Advertisement

Recent Posts!

Giving Buses Automatic Announcements

Started by Dash5155, March 04, 2019, 10:42:29 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dash5155

Get Exterior Announcements on ANY OMSI 2 Bus

This tutorial will show you how to get exterior announcements on your buses, based on the schedule you're on. Make sure you make backups of all your files, and attempt at your own risk! I will not be held responsible if you didn't make backups!!



So like look up which door OSC your bus uses (it's usually named door.osc but make sure you look at your.bus file to be sure) and then find this:

Code Select
{macro:Door Frame}
scroll down until you find something similar to this:

Code Select
(L.L.door_0) 0.9 > (S.L.PAX_Entry0_Open) (S.L.PAX_Exit0_Open)
 (L.L.door_2) 0.9 > (S.L.PAX_Entry1_Open) (S.L.PAX_Exit1_Open)
 (L.L.door_3) 0.9 > (S.L.PAX_Entry2_Open) (S.L.PAX_Exit2_Open)
 (L.L.door_4) 0.9 > (S.L.PAX_Entry3_Open) (S.L.PAX_Exit3_Open)
 (L.L.door_5) 0.9 > (S.L.PAX_Entry4_Open) (S.L.PAX_Exit4_Open)

Now I must warn it won't be exactly the same, so that's why I never outright told people to do this because if it doesn't work, I know for a fact that people will get angery with me and tell me I broke their games. So I warn it won't be the same, and if you're unsure MAKE BACKUPS. Anyways, under the last door Entry/exit, in this case the last one is 5, hit return to add an extra space, then add in this:

Code Select
(L.L.door_0) 0.05 >
 (L.L.external_announcement) 1 = &&
 {if}
 "..\..\Announcements\"
 0 (M.V.GetDepotStringGlobal) $+   
 "\" $+ 
 (M.V.GetTTLineString) $+
 "_EXT_" $+
 (M.V.GetTTTerminusIndex) 0 (M.V.GetTerminusString) $+
 ".wav" $+
 $msg (T.F.ev_ext_announce)
 0 (S.L.external_announcement)
 {endif}

 (L.L.door_0) 0.04 <
 (L.L.external_announcement) 0 = &&
 {if}
 "ditto.wav" $msg (T.F.ev_ext_announce)
 1 (S.L.external_announcement)
 {endif}
 

Then save.

NEXT, we open up the varlist for that same bus, mind you it's usually door_varlist.txt but it could be named something differently so check your .bus file under varlists to be sure.

anyway all you do in this case is add in this:

Code Select
external_announcement and save

We're almost done.

LAST STEP:

Open up the sound cfg file for whatever bus you're using. In this case, it's in the sound folder and normally named sound_[bus name].cfg but it could be named differently so make sure, again, you check your .bus files.

Anyways, just add in this small bit of code and save.

Code Select
[sound]

1

[3d]
1.386
5.502
2.573
5

[trigger]
ev_ext_announce


and save and viola, you've just given your bus automatic exterior announcements!



NOTES:
  • Depending on your scheduled trip and whatnot, so far this only works by default with Cayuga USA as it's the only map that has announcements made with this function in mind, but it could be expanded to other maps if other developers work with this, or if you make announcements yourself.
  • In order to have announcements play in other maps, you must create .wav files in the GLOBAL announcements directory relative to the .hof file with the name:
    [SCHEDULED ROUTE NUMBER]_EXT_[SCHEDULED ROUTE IBIS TERMINUS STRING].wav
    For example,
    47_EXT_CITY HALL.wav
  • To make buses announce when the front doors close, you can add a .wav file to your vehicle named "ditto.wav" in your vehicle's sound folder.

Thank me by sharing this tutorial if it works for you! Special thanks to user "John" for creating the originals as well!

dhaben81


htownman25

Just tested it out on the NovaBus LFSAs and it worked as expected.

*sigh*  Now to get to work on the buses that I may want to drive in Cayuga - including the buses that are already there (the AI buses).

NOTE:  I managed to get it working on the buses that I wanted this to work on - except on the MCI D4500CTs.

Other than that, great work on the tutorial Dash!

p.s.  :P

450 Guests, 0 Users

Advertisement

TinyPortal © 2005-2018