ehem. OMSI - Forum
Würden Sie gerne auf diese Nachricht reagieren? Erstellen Sie einen Account in wenigen Klicks oder loggen Sie sich ein, um fortzufahren.
ehem. OMSI - Forum

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

 

 Door Script Question?

Nach unten 
+3
Voith
Thiago
Andrew1396
7 verfasser
AutorNachricht
Andrew1396




Anzahl der Beiträge : 10
Anmeldedatum : 28.04.11

Door Script Question? Empty
BeitragThema: Door Script Question?   Door Script Question? Icon_minitimeMi 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
Thiago

Thiago


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

Door Script Question? Empty
BeitragThema: Re: Door Script Question?   Door Script Question? Icon_minitimeDo 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
http://www.tooo.com.br/omsi
Thiago

Thiago


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

Door Script Question? Empty
BeitragThema: Re: Door Script Question?   Door Script Question? Icon_minitimeDo 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
http://www.tooo.com.br/omsi
Voith

Voith


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

Door Script Question? Empty
BeitragThema: Re: Door Script Question?   Door Script Question? Icon_minitimeMi 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
poweredbycng

poweredbycng


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

Door Script Question? Empty
BeitragThema: Re: Door Script Question?   Door Script Question? Icon_minitimeFr 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
CristianSkytter

CristianSkytter


Anzahl der Beiträge : 533
Anmeldedatum : 02.03.11

Door Script Question? Empty
BeitragThema: Re: Door Script Question?   Door Script Question? Icon_minitimeFr 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
nemeza

nemeza


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

Door Script Question? Empty
BeitragThema: Re: Door Script Question?   Door Script Question? Icon_minitimeFr 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
http://nemeza.hgrg.hu
rzr09

rzr09


Anzahl der Beiträge : 273
Anmeldedatum : 08.11.10

Door Script Question? Empty
BeitragThema: Re: Door Script Question?   Door Script Question? Icon_minitimeMo 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
Gesponserte Inhalte





Door Script Question? Empty
BeitragThema: Re: Door Script Question?   Door Script Question? Icon_minitime

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: