Controlable door animation

uracco

Back to the studio!
Hi guys,
I just had an idea. Why doesn't trainz follow rail works, and have controllable doors? You could press a key D or O and the doors open and then D or C to shut them. I say this because the CPU controlled doors just don't stay open long enough. Would this be acheivable or would it require to much scripting?
Hopefully this will work
Uracco:)
 
D is already used i think, as is C.

it wouldnt take too much scripting to do it though. some of my traincars have operable doors in their properties dialog. they also open and close on loading.

all of that being said, isnt there a way to configure how long a train takes to load somewhere? i am new to rolling stock creation, but i seem to remember that someplace.
 
I was under the impression that the animation had some effect on how long the doors took to open and close.

Cheerio John
 
Yes, you could work a small delay in by delaying the start of the animation, but it would be very short. There is also a 'sleep' script command, that I have used in some of my animated boxcar and reefer's with some success. I think the 28' ng reefer was one. It was kind of quirky though.
As for operating the doors manually, I suspect the only way is through the browser window, though some years ago (i'm an old trainz geezer), it was suggested to use the pantograph button. Never tried it, but it may work.
Paul Hobbs cars use the browser window method. I've been studying his gs. file for hints on making a browser window for just the doors. His has all sorts of effects.

John
 
There is a minibus on the DLS that is drivable and it uses the panto button for it's door.
Would be great to do this in the train cab.
The AJS stations are adjustable to waiting time at the platform and the doors stay open for the time set in the properties panel.
 
Another option is to use the 'door control' (I think it's called) driver command to manually open/close the doors. Can be used for non power operated doors, where you might have seen them open whilst running on hot days.

Pretty sure it's built-in in TS2010 and TS2009 as well.
 
isnt there a way to configure how long a train takes to load somewhere?

Generally in the industry, although you can also add sleep statements in a car's script to delay that particular car.
In the industry, use these subroutines:
Code:
  float GetLoadTime  (LoadingReport report)
  {  
     return(10);
  }

  float GetUnloadTime  (LoadingReport report)
  {  
     return(10);
  }
This will cause both loading and unloading to take 10 seconds.

Hope that helps,
Curtis
 
I was under the impression that the animation had some effect on how long the doors took to open and close.

Yep, Under normal conditions with no speed setting in a script or config.txt a 30 frame animation will take one second to open and one second to close.
60 frames will take 2 seconds. However the time that the doors stay open is controlled in most cases by some setting in the station or industry you are using.

As already mentioned Andi06's AJS stations have this setting in the station setup HTML in surveyor.
 
Isn't there something in the "Event" file one can create when animating the doors and where one can place a delay for the doors (among other events one can create there) to shut? AFAIK this will place "events" linked to certain animation frames, (a wait delay in seconds could be one of these events I guess) as I remember reading about the "Event" file being used that way somewhere. I have never tried this myself.

Or am I wrong?

Cheers

VinnyBarb
 
You could trigger a delay in script using an event file, but it's probably a bit simpler to just code the delay in vehicle's script directly - in the BeginLoad(); EndLoad(); BeginUnload(); and/or EndUnload() routines.
The delay could be done with either a Sleep() or a return() statement (the routines return how long they are supposed to take)

Curtis
 
Thanks!

Hi guys,
Thanks for all your brill replys. I have managed to add some scripting to my London Midland Class 172 Turbostar and can now keep the doors open as long as I want.
Thanks very much agin
Uracco
 
Well, I did a search for this and this thread is closest to relevant. I downloaded

Passenger Door Control,<kuid:57344:1015>

And activated it in the driver command rules for the session, now what? There's no description or instructions. Jeff Morris made something similar;

Train Door Controller,<kuid2:44558:70000:1>

But all it says in the description for that is "Train Door Controller".

Once you have one of these installed and activated, WHAT KEY DO YOU PRESS to open and close the doors? I can't find any documentation anywhere, the keyboard.txt file says ALT ; and ALT ' for train_cabin_hardware_0 and train_cabin_hardware_1 but that's not it. Pantograph control don't do anything either.
 
i believe the AJS invisible stations have the ability to specify how long the doors stay open at them, when you set them up.

peter
 
Hi,
Any one looked at user name wearsprada ?

the boxcars series xVg
Ii spoke with Tram about his tilt sway script before..

These are the guys for this
 
Last edited:
Not what I'm looking for, I'm trying to find a keystroke or rule that will allow opening and closing passenger doors anyplace by manual control. There's a GP-15 that uses the pantograph control (END key) to open and close a door, is that the only way?
 
My door controllers use the mouse on the browser window to open doors and they close after a few seconds. I wish that I could use keys to open and close the doors.
 
The driver commands are just that, driver commands :) To use them, add them into your session, and then use the 'commands' panel at the bottom of the screen. These are more intended for AI use, however they do still work for non AI use. :)
 
"they do still work for non AI use" hee-hee, again you left out the best part - HOW?! What key do I use to open and close train doors?

"use the mouse on the browser window"

Gotta be a joke but I'll bite, where is the "browser window" in game?
 
Sorry Sniper, I took a guess (and somewhat failed) that you're used to the AI commands system :)

To use them, you use the drivers commands panel at the bottom of the screen, when you are viewing the train. Click on the little green 'arrow' to bring up the information box, and then go to the appropriate command (it should be the same name as on the DLS), and it should then bring up another menu to the side. Go through this, and you should see the option to either open or close the doors. Click on the appropriate option, and the AI should then open/close the doors.

If you are building a fully automated session (or just setting up AI trains around a player train), you can use this command as well. You will need to do similar to above, but using the 'driver setup' rule in Surveyor (found in the 'edit session' window in Surveyor).

You can also add driver commands to a train by holding down the 'CTRL' key, and then right clicking on a vehicle in the consist. Now, follow the same methods in the menu to add a driver command.

Unfortunately, there's no simple 'keystroke' system, since the door animation is controlled automatically by the AI when loading/unloading at stations :)

Zec
 
Okay, you guys are talking about the F6 driver interface, I got it now, thanks. Gotta remember I'm still a Trainz n00b, and being a senile old geezer I tend to forget everything I've learned if I take a coffee break. :hehe:
 
Back
Top