Hier noch mal zum Weiterdenken die clever.osc aus dem DBC Citybus:
Code: Auszug: clever.osc
' ########################################################################################################################################################################
' EXTERNAL BUS STOPS ANNOUNCEMENTS
' ########################################################################################################################################################################
(L.L.clever_run_active)
(L.L.clever_int_line) trunc 124 = (L.L.clever_int_line) trunc 130 = || &&
(L.L.clever_finalstop) ! &&
(L.L.cp_switch_speaker) 1 < &&
{if}
' SEQUENCE 1 = WHEN ANNOUNCE_SEQ IS READY, DEPARTING STOP AND WAITING FOR ARRIVAL
(L.L.door_0) 0 = (L.L.Velocity) 1 > && (L.L.ext_announce_seq) 0 = &&
{if}
1 (S.L.ext_announce_seq) 0 (S.L.ext_announce_time) (S.L.ext_announce_repeat)
{endif}
' SEQUENCE 2 = ARRIVING AND ANNOUNCING WHEN DOORS OPEN
(L.L.ext_announce_seq) 1 = (L.L.door_0) 0 = ! &&
{if}
2 (S.L.ext_announce_seq)
(L.L.globaltimer) (S.L.ext_announce_time)
{endif}
(L.L.ext_announce_seq) 2 =
(L.L.globaltimer) (L.L.ext_announce_time) (C.L.ext_announce_delay) + > &&
{if}
3 (S.L.ext_announce_seq) 0 (S.L.ext_announce_repeat)
{endif}
' SEQUENCE 3 = AT THE STOP ANNOUNCING UNTIL DEPARTURE
(L.L.ext_announce_seq) 3 =
{if}
(L.L.ext_announce_repeat) 0 =
{if}
"..\..\Announcements\"
0 (M.V.GetDepotStringGlobal) $+
"\" $+
(M.V.GetTTLineString) $+
"_EXT_" $+
(M.V.GetTTTerminusIndex) 0 (M.V.GetTerminusString) $+
".wav" $+
$msg (T.F.ev_ext_announce)
{endif}
(L.L.ext_announce_repeat) (L.S.Timegap) + (S.L.ext_announce_repeat) s0
l0 (C.L.ext_announce_repeat) > {if} 0 (S.L.ext_announce_repeat) {endif}
{endif}
' RESET WHEN DEPARTING
(L.L.door_0) 0 = (L.L.ext_announce_seq) 1 > &&
{if}
0 (S.L.ext_announce_seq) 0 (S.L.ext_announce_time) 0 (S.L.ext_announce_repeat)
{endif}
{else}
0 (S.L.ext_announce_seq) (S.L.ext_announce_time) (S.L.ext_announce_repeat)
{endif}
Alles anzeigen
Ich habe noch so etwas ausprobiert, bekomme aber einen Fehler bei Bereichsprüfung:
Code: door.osc
'Tastaturtrigger Vordertuer
{trigger:bus_doorfront0}
(L.L.door_0) 0.05 <
{if}
(L.L.elec_busbar_main_sw) (L.L.engine_injection_on) ||
(L.L.cp_lockdoors_targeton) ! &&
(L.L.doorEntriegelung_01) ! &&
(L.L.Velocity) (C.L.doors_maxvspeed) < (L.L.elec_busbar_main_sw) 0 = || &&
(L.L.bremse_p_Tank04) 650000 >= &&
' (L.L.Throttle) 0.3 < &&
{if}
(M.L.trg_bus_doorfront0)
'NEUE MODIFIKATION
(M.V.GetTTLineString) 31 =
{if}
(T.L.announcement_line_31_1)
{endif}
(L.L.door_1) 0.05 < {if} (M.L.trg_bus_doorfront1) {endif}
{endif}
Alles anzeigen