Strefa OMSI

Pełna wersja: Dynamic Bus Display
Aktualnie przeglądasz uproszczoną wersję forum. Kliknij tutaj, by zobaczyć wersję z pełnym formatowaniem.
Witam!

Wymodelowałem sobie tablicę elektroniczną i potrzebuję pomocy w rozgryzieniu skryptu "Dynamic Bus Display". Skrypt ten pozwala na wyświetlenie 2 najbliższych odjazdów na przystanek. Ja bym chciał aby wyświetlało się min. 6 odjazdów.

Skrypt wygląda tak:
Kod:
'#################################
'Dynamic Bus Stop Display System
'#################################

'System displays the next both arriving busses at this bus stop

'(c) 14.12.2011 Marcel Kuhnt

'Script Version: 1.0
'Omsi release: 1.0

'Needs:
'- none




{init}

{end}

{frame}


'Blinkgeber:
    (L.S.GetTime) 2 % 1 < (S.L.Blink)

'ZEILE 1 ==============================================


'Zuerst prüfen, ob das Ziel valide ist:

    0 (M.V.GetArrBusTerminus) (S.$.Terminus)
    "" $=
    {if}
'Wenn nicht, dann nix anzeigen:
        0
    {else}
'Abfahrtszeit schonmal zwischenspeichern unter s0:
        0 (M.V.GetArrBusTimeDiff) 120 / s0

'Wenn die Abfahrtszeit weniger als eine Minute ist, dann blinken: (wenns blinkt, ist s1/l1 wahr!)
        l0 1.0 < s1
        {if}
            (L.L.Blink)
        {else}
'Sonst anzeigen:
            1
        {endif}
    {endif}
        
'Vorherig ermitteltes Ergebnis nun verwenden als Bedingung, ob was angezeigt wird:
    {if}
        0 (M.V.GetArrBusLine) 3 $SetLengthL $+ " " $+
        0 (L.$.Terminus) 13 $SetLengthL $+ " " $+
'Wenn es blinkt, dann die Uhrzeit nicht mehr anzeigen:
        l1
        {if}
            "  " $+
        {else}
            0 l0 0 max " 2" $IntToStrEnh $+
        {endif}
    {endif}

'ZEILENUMBRUCH ==============================================

    "@" $+

'ZEILE 2 ==============================================


'Zuerst prüfen, ob das Ziel valide ist:

    1 (M.V.GetArrBusTerminus) (S.$.Terminus)
    "" $=
    {if}
'Wenn nicht, dann nix anzeigen:
        0
    {else}
'Abfahrtszeit schonmal zwischenspeichern unter s0:
        1 (M.V.GetArrBusTimeDiff) 120 / s0

'Wenn die Abfahrtszeit weniger als eine Minute ist, dann blinken: (wenns blinkt, ist s1/l1 wahr!)
        l0 1.0 < s1
        {if}
            (L.L.Blink)
        {else}
'Sonst anzeigen:
            1
        {endif}
    {endif}
        
'Vorherig ermitteltes Ergebnis nun verwenden als Bedingung, ob was angezeigt wird:
    {if}
        1 (M.V.GetArrBusLine) 3 $SetLengthL $+ " " $+
        0 (L.$.Terminus) 13 $SetLengthL $+ " " $+
'Wenn es blinkt, dann die Uhrzeit nicht mehr anzeigen:
        l1
        {if}
            "  " $+
        {else}
            0 l0 0 max " 2" $IntToStrEnh $+
        {endif}
    {endif}

    $+
'ZEILENUMBRUCH ==============================================

    "@" $+
    
'ZEILE 3 ==============================================


'Zuerst prüfen, ob das Ziel valide ist:

    2 (M.V.GetArrBusTerminus) (S.$.Terminus)
    "" $=
    {if}
'Wenn nicht, dann nix anzeigen:
        0
    {else}
'Abfahrtszeit schonmal zwischenspeichern unter s0:
        2 (M.V.GetArrBusTimeDiff) 120 / s0

'Wenn die Abfahrtszeit weniger als eine Minute ist, dann blinken: (wenns blinkt, ist s1/l1 wahr!)
        l0 1.0 < s1
        {if}
            (L.L.Blink)
        {else}
'Sonst anzeigen:
            1
        {endif}
    {endif}
        
'Vorherig ermitteltes Ergebnis nun verwenden als Bedingung, ob was angezeigt wird:
    {if}
        2 (M.V.GetArrBusLine) 3 $SetLengthL $+ " " $+
        0 (L.$.Terminus) 13 $SetLengthL $+ " " $+
'Wenn es blinkt, dann die Uhrzeit nicht mehr anzeigen:
        l1
        {if}
            "  " $+
        {else}
            0 l0 0 max " 2" $IntToStrEnh $+
        {endif}
    {endif}

'ZEILENUMBRUCH ==============================================

    "@" $+

    
'ZEILE 4 ==============================================


'Zuerst prüfen, ob das Ziel valide ist:

    3 (M.V.GetArrBusTerminus) (S.$.Terminus)
    "" $=
    {if}
'Wenn nicht, dann nix anzeigen:
        0
    {else}
'Abfahrtszeit schonmal zwischenspeichern unter s0:
        3 (M.V.GetArrBusTimeDiff) 120 / s0

'Wenn die Abfahrtszeit weniger als eine Minute ist, dann blinken: (wenns blinkt, ist s1/l1 wahr!)
        l0 1.0 < s1
        {if}
            (L.L.Blink)
        {else}
'Sonst anzeigen:
            1
        {endif}
    {endif}
        
'Vorherig ermitteltes Ergebnis nun verwenden als Bedingung, ob was angezeigt wird:
    {if}
        3 (M.V.GetArrBusLine) 3 $SetLengthL $+ " " $+
        0 (L.$.Terminus) 13 $SetLengthL $+ " " $+
'Wenn es blinkt, dann die Uhrzeit nicht mehr anzeigen:
        l1
        {if}
            "  " $+
        {else}
            0 l0 0 max " 2" $IntToStrEnh $+
        {endif}
    {endif}

    $+
    
'AUSGABE ==============================================

    (S.$.Displaytext)

    1 (S.L.Refresh_Strings)
{end}

Pola ZEILE 3 i ZEILE 4 są skopiowane przeze mnie. Teraz co trzeba zmienić aby ZEILE 3 wyświetlało 3 odjazd, a ZEILE 4 czwarty?

Zmieniając w ZEILE 3 i ZEILE 4 w linijkach
Kod:
'Zuerst prüfen, ob das Ziel valide ist:

    0 (M.V.GetArrBusTerminus) (S.$.Terminus)
Kod:
'Abfahrtszeit schonmal zwischenspeichern unter s0:
        0 (M.V.GetArrBusTimeDiff) 120 / s0
Kod:
'Vorherig ermitteltes Ergebnis nun verwenden als Bedingung, ob was angezeigt wird:
    {if}
        0 (M.V.GetArrBusLine) 3 $SetLengthL $+ " " $+
mogę jedynie powielać wpisy z ZEILE 1 i ZEILE 2 tj. "0" dla pierwszego odjazdu wyświetlanego na tablicy i "1" dla drugiego. Wpisując zamiast "0" i "1" kolejno "2" i "3" w grze pokazują się tylko podstawowe 2 wpisy na tablicy.

Co trzeba dodać zmienić w tym skrypcie aby można było wyświetlić więcej odjazdów?

Z góry dzięki za pomoc.
Temat do zamknięcia.

Problemem była tekstura na której widniały tylko 2 linijki. Po wy edytowaniu tekstury wszystko gra i tańczy:)
Przekierowanie