ehem. OMSI - Forum

Dieses Forum wurde geschlossen. Das neue Forum befindet sich auf www.omnibussimulator.de/forum !
 
StartseiteStartseite  FAQFAQ  SuchenSuchen  MitgliederMitglieder  NutzergruppenNutzergruppen  AnmeldenAnmelden  LoginLogin  

Teilen | 
 

 Door Script Question?

Nach unten 
AutorNachricht
Andrew1396



Anzahl der Beiträge : 10
Anmeldedatum : 28.04.11

BeitragThema: Door Script Question?   Mi 4 Mai - 17:43

What file do I need to edit in order to make the doors open WITHOUT the need to use the Station Brake for the D92?

Thanks in advance, I tried looking in all door files, but I just can't figure it out.
Nach oben Nach unten
Benutzerprofil anzeigen
Thiago

avatar

Anzahl der Beiträge : 252
Anmeldedatum : 18.02.11
Ort : Brazil

BeitragThema: Re: Door Script Question?   Do 5 Mai - 6:29

Good morning, Andrew.
I tried to edit the script door.osc and I came across with this functions:

Code:
{trigger:bus_doorfront0}
   (L.L.elec_busbar_main) (L.L.bremse_halte_sw) (C.L.door_needs_stopbrake) ! && &&
   (L.L.elec_busbar_main) (L.L.bremse_halte) (C.L.door_needs_stopbrake) && && ||
   {if}
      (M.L.trg_bus_doorfront0)
   {endif}
   1 (S.L.cockpit_tuertaster1)
{end}

and

Code:
{trigger:bus_doorfront1}
   (L.L.elec_busbar_main) (L.L.bremse_halte_sw) (C.L.door_needs_stopbrake) ! && &&
   (L.L.elec_busbar_main) (L.L.bremse_halte) (C.L.door_needs_stopbrake) && && ||
   {if}
      (M.L.trg_bus_doorfront1)
   {endif}
   1 (S.L.cockpit_tuertaster2)
{end}

I don't know how to program in this scripting language, but I tried to remove the 2 first lines of each trigger and also the {if} statement. My final coding was:


Code:
{trigger:bus_doorfront0}
        (M.L.trg_bus_doorfront0)
   1 (S.L.cockpit_tuertaster1)
{end}
and

Code:
{trigger:bus_doorfront1}
   (M.L.trg_bus_doorfront1)
   1 (S.L.cockpit_tuertaster2)
{end}

And it worked! Smile
I think it would be more ellegant if I just dealed with the logic operators in the beginning of each trigger, but I couldn't figure out well about the structure.
Now the doors can be opened even if the bus is cold dark.
I hope I could help you a little.
Nach oben Nach unten
Benutzerprofil anzeigen http://www.tooo.com.br/omsi
Thiago

avatar

Anzahl der Beiträge : 252
Anmeldedatum : 18.02.11
Ort : Brazil

BeitragThema: Re: Door Script Question?   Do 5 Mai - 7:10

Hi again,
I now tried to modify the script the minimum possible. I think it can suit better if you want this feature just in the D92.

I changed the following constant in the file door_constfile_D92.txt:

[const]
door_needs_stopbrake
0

And the triggers I changed before are now (front doors):

Code:
{trigger:bus_doorfront0}
   (L.L.elec_busbar_main) (C.L.door_needs_stopbrake) ! &&
   (L.L.elec_busbar_main) (C.L.door_needs_stopbrake) && ||
   {if}
      (M.L.trg_bus_doorfront0)
   {endif}
   1 (S.L.cockpit_tuertaster1)
{end}

and

Code:
{trigger:bus_doorfront1}
   (L.L.elec_busbar_main) (C.L.door_needs_stopbrake) ! &&
   (L.L.elec_busbar_main) (C.L.door_needs_stopbrake) && ||
   {if}
      (M.L.trg_bus_doorfront1)
   {endif}
   1 (S.L.cockpit_tuertaster2)
{end}
Nach oben Nach unten
Benutzerprofil anzeigen http://www.tooo.com.br/omsi
Voith

avatar

Anzahl der Beiträge : 33
Anmeldedatum : 22.02.11
Ort : UK

BeitragThema: Re: Door Script Question?   Mi 11 Mai - 14:33

FYI, you can open a single door (if cold and dark) by clicking the right headlight in the external view without the need of ignition or station brake. Great touch!
Nach oben Nach unten
Benutzerprofil anzeigen
poweredbycng

avatar

Anzahl der Beiträge : 151
Anmeldedatum : 20.02.11
Alter : 33
Ort : Perth, Australien

BeitragThema: Re: Door Script Question?   Fr 13 Mai - 16:15

G'day all,

In my opinion, it would be great if someone can script the automatic application of the bus stop brake upon opening the front (or rear) doors.

Once all doors are closed, the bus stop brake should then automatically release.
Nach oben Nach unten
Benutzerprofil anzeigen
CristianSkytter

avatar

Anzahl der Beiträge : 533
Anmeldedatum : 02.03.11

BeitragThema: Re: Door Script Question?   Fr 13 Mai - 16:28

poweredbycng schrieb:
G'day all,

In my opinion, it would be great if someone can script the automatic application of the bus stop brake upon opening the front (or rear) doors.

Once all doors are closed, the bus stop brake should then automatically release.

Yes, it's good idea.
In free time, I will take a look.

Regards.
Nach oben Nach unten
Benutzerprofil anzeigen
nemeza

avatar

Anzahl der Beiträge : 204
Anmeldedatum : 27.04.09
Ort : Budapest

BeitragThema: Re: Door Script Question?   Fr 3 Jun - 20:17

poweredbycng schrieb:
G'day all,

In my opinion, it would be great if someone can script the automatic application of the bus stop brake upon opening the front (or rear) doors.

Once all doors are closed, the bus stop brake should then automatically release.
As far, as I know, there is an event when doors are closed. So using this as handler, function for releasing of bus stop brake could be called.
Nach oben Nach unten
Benutzerprofil anzeigen http://nemeza.hgrg.hu
rzr09

avatar

Anzahl der Beiträge : 273
Anmeldedatum : 08.11.10

BeitragThema: Re: Door Script Question?   Mo 25 Jul - 14:25

i have a little question how can i script a fuction so the bustop brake wont go off till the front doors finish closing, its a safety feature here in the uk Smile
Nach oben Nach unten
Benutzerprofil anzeigen
Gesponserte Inhalte




BeitragThema: Re: Door Script Question?   

Nach oben Nach unten
 
Door Script Question?
Nach oben 
Seite 1 von 1

Befugnisse in diesem ForumSie können in diesem Forum nicht antworten
ehem. OMSI - Forum :: OMSI-Design (english) :: Script programming-
Gehe zu: