TOPlist

[NÁVOD] Oprava chovania dverí v AI pre Karosy B732 a B931

[NÁVOD] Oprava chovania dverí v AI pre Karosy B732 a B931

Příspěvekod stefco » 04 říj 2013 10:46

Určite ste si všimli, že ak používate Karosu B732 alebo B931 ako AI, nezatvorí sa posledné krídlo zadných dverí. Mne sa podarilo to opraviť. Postup je nasledovný:
1. otvoriť súbor ...\OMSI\Vehicles\Karosa_B732\Script\door.osc resp. ...\OMSI\Vehicles\Karosa_B931\Script\door.osc

2. nájsť odstavec AI-ablauf, mal by vyzerať takto:
Kód: Vybrat vše
'----------------------
'   AI-Ablauf:

(L.L.AI_Scheduled_AtStation) s0
1 =
{if}
'Wenn Türen geöffnet werden sollen:
   (L.L.Velocity) (C.L.Door_Bremse_Halte_MaxKMH) <
   {if}
'Nur, wenn v < maxkmh, sonst warten
'Taster jeweils nur betätigen, falls noch nicht an
      (L.L.bremse_halte_sw) !
      {if}
         (M.L.trg_bus_dooraft)
      {endif}
      (L.L.doorTarget_0) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront0)
      {endif}
      (L.L.doorTarget_1) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront1)
      {endif}
      
            (L.L.doorTarget_2) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront2)
      {endif}
      
      (L.L.doorTarget_3) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront3)
      {endif}
      
            (L.L.doorTarget_4) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront4)
      {endif}
      
      (L.L.doorTarget_5) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront5)
      {endif}

   {else}
      0 (S.L.door_AI_timer)
   {endif}
   (L.L.door_AI_timer) (L.S.Timegap) + (S.L.door_AI_timer)
{else}
l0 -1 =
{if}
'Wenn Türen geschlossen werden sollen:
'Taster jeweils nur betätigen, falls noch nicht aus:
   (L.L.doorTarget_1)
   {if}
      (M.L.trg_bus_doorfront1)
      0 (S.L.door_AI_timer)
   {endif}
   (L.L.doorTarget_0) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront0)
      0 (S.L.door_AI_timer)
   {endif}
   
      (L.L.doorTarget_2) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront2)
      0 (S.L.door_AI_timer)
   {endif}
   
         (L.L.doorTarget_3) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront3)
      0 (S.L.door_AI_timer)
   {endif}
   
      (L.L.doorTarget_4) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront4)
      0 (S.L.door_AI_timer)
      0 (S.L.AI_Scheduled_AtStation)
   {endif}
   
      (L.L.doorTarget_5) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront5)
      0 (S.L.door_AI_timer)
      0 (S.L.AI_Scheduled_AtStation)
   {endif}
   
   (L.L.doorTarget_4) 0 =
   (L.L.doorTarget_5) 0 = &&
   (L.L.doorTarget_3) 0 = &&
   (L.L.doorTarget_2) 0 = &&
   (L.L.AI_Scheduled_AtStation) 1 = &&
   {if}
   0 (S.L.AI_Scheduled_AtStation)
   {endif}
   
   (L.L.doorTarget_4) 0 =
   (L.L.doorTarget_5) 0 = &&
   {if}
   0 (L.L.bremse_halte_sw)
   {endif}
'Haltestellenbremse erst wegnehmen, wenn alle Türen zu. Dann auch erst den Bus AI-mäßig freigeben:
   (L.L.door_0) 0.1 <
   (L.L.door_1) 0.1 < &&
   (L.L.door_2) 0.1 < &&
   (L.L.door_3) 0.1 < &&
   (L.L.door_4) 0.1 < &&
   (L.L.door_5) 0.1 < &&
   {if}
      (L.L.door_AI_timer) 0.3 > &&
      {if}
      0 (S.L.doorTarget_0)
      0 (S.L.doorTarget_2)
      0 (S.L.doorTarget_3)
      0 (S.L.doorTarget_4)
      0 (S.L.doorTarget_5)
      {endif}
      (L.L.bremse_halte_sw) !
      {if}
         
      {endif}
   {else}
'Sollte eine der Türen auf sein und die Haltestellenbremse aus, dann sofort diese einlegen
      (L.L.bremse_halte_sw) !
      {if}
         (M.L.trg_bus_dooraft)
      {endif}
      (L.L.doorTarget_0) !
      (L.L.doorTarget_2) ! &&
      (L.L.doorTarget_3) ! &&
      (L.L.doorTarget_4) ! &&
      (L.L.doorTarget_5) ! &&
      {if}
         0 (S.L.door_AI_timer)
      {endif}
   {endif}
   (L.L.door_AI_timer) (L.S.Timegap) + (S.L.door_AI_timer)
{endif}
{endif}


{end}


a nahradiť ho týmto:
Kód: Vybrat vše
'----------------------
'   AI-Ablauf:

(L.L.AI_Scheduled_AtStation) s0
1 =
{if}
'Wenn Türen geöffnet werden sollen:
   (L.L.Velocity) (C.L.Door_Bremse_Halte_MaxKMH) <
   {if}
'Nur, wenn v < maxkmh, sonst warten
'Taster jeweils nur betätigen, falls noch nicht an
      (L.L.bremse_halte_sw) !
      {if}
         (M.L.trg_bus_dooraft)
      {endif}
      (L.L.doorTarget_0) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront0)
      {endif}
      (L.L.doorTarget_1) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront1)
      {endif}
      
            (L.L.doorTarget_2) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront2)
      {endif}
      
      (L.L.doorTarget_3) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront3)
      {endif}
      
            (L.L.doorTarget_4) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront4)
      {endif}
      
      (L.L.doorTarget_5) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront5)
      {endif}

   {else}
      0 (S.L.door_AI_timer)
   {endif}
   (L.L.door_AI_timer) (L.S.Timegap) + (S.L.door_AI_timer)
{else}
l0 -1 =
{if}
'Wenn Türen geschlossen werden sollen:
'Taster jeweils nur betätigen, falls noch nicht aus:
   (L.L.doorTarget_1)
   {if}
      (M.L.trg_bus_doorfront1)
      0 (S.L.door_AI_timer)
   {endif}
   (L.L.doorTarget_0) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront0)
      0 (S.L.door_AI_timer)
   {endif}
   
      (L.L.doorTarget_2) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront2)
      0 (S.L.door_AI_timer)
   {endif}
   
         (L.L.doorTarget_3) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront3)
      0 (S.L.door_AI_timer)
   {endif}
   
      (L.L.doorTarget_4) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront4)
      0 (S.L.door_AI_timer)
   {endif}
   
      (L.L.doorTarget_5) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront5)
      0 (S.L.door_AI_timer)
   {endif}
   
'Haltestellenbremse erst wegnehmen, wenn alle Türen zu. Dann auch erst den Bus AI-mäßig freigeben:
   (L.L.door_0) 0.1 <
   (L.L.door_1) 0.1 < &&
   (L.L.door_2) 0.1 < &&
   (L.L.door_3) 0.1 < &&
   (L.L.door_4) 0.1 < &&
   (L.L.door_5) 0.1 < &&
   {if}
      (L.L.bremse_halte_sw) (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_dooraft)
         
      {endif}
      (L.L.bremse_halte_sw) !
      {if}
         0 (S.L.AI_Scheduled_AtStation)
      {endif}
   {else}
'Sollte eine der Türen auf sein und die Haltestellenbremse aus, dann sofort diese einlegen
      (L.L.bremse_halte_sw) !
      {if}
         (M.L.trg_bus_dooraft)
      {endif}
      (L.L.doorTarget_0) !
      (L.L.doorTarget_1) ! &&
      (L.L.doorTarget_2) ! &&
      (L.L.doorTarget_3) ! &&
      (L.L.doorTarget_4) ! &&
      (L.L.doorTarget_5) ! &&
      {if}
         0 (S.L.door_AI_timer)
      {endif}
   {endif}
   (L.L.door_AI_timer) (L.S.Timegap) + (S.L.door_AI_timer)
{endif}
{endif}


{end}


Uložiť zmeny a oprava je dokončená a AI bus už bude zatvárať všetky dvere ;)
Veľa kilometrov bez nehody praje Stefco
Naposledy upravil stefco dne 02 srp 2014 15:40, celkově upraveno 2
Uživatelský avatar
stefco
Zasloužilý scripter
Zasloužilý scripter
 
Příspěvky: 1004
Registrován: 12 srp 2011 22:17

Re: Oprava chovania dvreí v AI pre Karosy B732 a B931

Příspěvekod MastermanCZ » 04 říj 2013 19:27

Stefco výborně! Já jenom čučím co ty dovedeš. Opravdu by sis zasloužil titul Vrchní Scriptař Československé Omsi Komunity :D
ObrázekObrázek Obrázek - Sleduji videa od autobus1195
Mám rád Sorky a Karosky-Iveca jedně Crosswaye a Arwaye.
Uživatelský avatar
MastermanCZ
Diskutující člen
Diskutující člen
 
Příspěvky: 273
Registrován: 02 zář 2013 15:53
Bydliště: Krnov, Tam kde to má na starosti Arriva Morava.

Re: Oprava chovania dvreí v AI pre Karosy B732 a B931

Příspěvekod Staník » 04 říj 2013 22:22

Souhlasím s MastermanCZ, opravdu skvělá práce! A tu hodnost by sis opravdu zasloužil.... :)
Obrázek
Batman je nejlepší hrdina všech dob!!!
Snažím se pomoci, když vím, a to slušným způsobem.
Nesnáším Prahu.
Uživatelský avatar
Staník
Stálý člen
Stálý člen
 
Příspěvky: 2352
Registrován: 29 črc 2012 12:26
Bydliště: Brno - Maloměřice a OBŘANY


Zpět na Scripty a zvuky

Kdo je online

Uživatelé procházející toto fórum: Žádní registrovaní uživatelé a 24 návštevníků