i want to make my platform screen doors move plz help

Post your questions about object, route and train development here. Be sure to have consulted the documentation first.

i want to make my platform screen doors move plz help

Postby tpclhk on Tue, 19th May 2009, 13:46

i want to make my platform screen doors move when i open the train doors, i have a train that can open doors already, but ermm i want the screen doors to move when i open the train doors, im new to openbve, how can i "program" the screen doors to do so? or i should program both train doors and screen doors???
:arrow: plz tell me any software i needed to program this.
:arrow: plz tell me wt code i can use to do this too

thx all you guys!
tpclhk
 
Posts: 7
Joined: Tue, 19th May 2009, 13:41

Re: i want to make my platform screen doors move plz help

Postby alvinwong on Wed, 20th May 2009, 07:34

You may use the code same as the one on the train.
Or you may try the following code:
Code: Select all
TranslateZFunction =
max[min[(leftdoorstarget 0.5) * MOVE_DISTANCE_PER_MS value deltaDOOR_MOVE_DISTANCE], 0

MOVE_DISTANCE_PER_MS
-The distance move (m) every 1/1000 second
DOOR_MOVE_DISTANCE
-Total (maximum) distance the door will move

This code is a bit complicated but can keep a steady pace of the PSD's speed and not related to train door's speed.
(I haven't tried before)
Problems, solutions, problems, solutions...
Tired on these, and trying to make openBVE train Exterior, then...
Problems... ###again### Crazy...
Please visit http://www.hochun.nets.hk/discuz/index.php
User avatar
alvinwong
 
Posts: 228
Joined: Sat, 24th Jan 2009, 05:16
Location: Hong Kong

Re: i want to make my platform screen doors move plz help

Postby tpclhk on Wed, 20th May 2009, 08:46

the code u give me as above should be edited in what place of the file and which file to edit it in?
THX!
tpclhk
 
Posts: 7
Joined: Tue, 19th May 2009, 13:41

Re: i want to make my platform screen doors move plz help

Postby velaro on Wed, 20th May 2009, 09:17

I assume you just wish to add the animation to a station which already exists? If so, it may be helpful to know which station(s) on which route. Also, are you familiar with the basics of object coding? Because I think you need to be before you start adding animations.
Juergen H
User avatar
velaro
 
Posts: 196
Joined: Mon, 14th Apr 2008, 23:11
Location: The Holy City of the Hot Dog

Re: i want to make my platform screen doors move plz help

Postby tpclhk on Wed, 20th May 2009, 10:33

velaro wrote:I assume you just wish to add the animation to a station which already exists? If so, it may be helpful to know which station(s) on which route. Also, are you familiar with the basics of object coding? Because I think you need to be before you start adding animations.

actually i know nth......
yes , i wish to add a platform screen doors animation to a station which already exists when my train doors opens like this
http://www.youtube.com/watch?v=HloAnl7i ... annel_page
tpclhk
 
Posts: 7
Joined: Tue, 19th May 2009, 13:41

Re: i want to make my platform screen doors move plz help

Postby alvinwong on Wed, 20th May 2009, 16:37

I think you should read this first:
http://openbve.trainsimcentral.co.uk/develop/object_animated.html

Maybe move the post to Object section
Problems, solutions, problems, solutions...
Tired on these, and trying to make openBVE train Exterior, then...
Problems... ###again### Crazy...
Please visit http://www.hochun.nets.hk/discuz/index.php
User avatar
alvinwong
 
Posts: 228
Joined: Sat, 24th Jan 2009, 05:16
Location: Hong Kong

Re: i want to make my platform screen doors move plz help

Postby tpclhk on Thu, 21st May 2009, 13:27

or anyone have did this "screen doors and train doors opening at same time"?
plz gimme yours for my ref, thx! juz reference ONLY, no public sharing. for those plz pm me, dont answer here.
THX
i know that someone is linking to this page...: http://bbs.i-circle.net/viewtopic.php?f=112&t=9674
tpclhk
 
Posts: 7
Joined: Tue, 19th May 2009, 13:41

Re: i want to make my platform screen doors move plz help

Postby tpclhk on Fri, 22nd May 2009, 07:13

if anyone would kindly like to help me, please pm me.

dont post files uploads or solutions for my question here.

as "佢地發現左我地 link 佢地個 post": http://bbs.i-circle.net/viewtopic.php?f=112&t=9674


:x
tpclhk
 
Posts: 7
Joined: Tue, 19th May 2009, 13:41

Re: i want to make my platform screen doors move plz help

Postby velaro on Fri, 22nd May 2009, 08:16

Animating objects involves coding. Nobody else can do this for you unless you at least specify the route you have in mind; if you do, someone might be interested in this project, but it's far from certain. You can always try to do it yourself, and if you run into problems, post back here.

To animate screen doors, you have to have at least a basic understanding of object coding and of how animation works. Alvingwong provided the link for the latter; for a tutorial on object coding, try http://dennislance.zoomshare.com/1.html, http://bve.altervista.org/guide.html, or http://www.bvestation.com/forums/index.php?board=87.0.
Juergen H
User avatar
velaro
 
Posts: 196
Joined: Mon, 14th Apr 2008, 23:11
Location: The Holy City of the Hot Dog

Re: i want to make my platform screen doors move plz help

Postby tpclhk on Fri, 22nd May 2009, 08:45

velaro wrote:Animating objects involves coding. Nobody else can do this for you unless you at least specify the route you have in mind; if you do, someone might be interested in this project, but it's far from certain. You can always try to do it yourself, and if you run into problems, post back here.

To animate screen doors, you have to have at least a basic understanding of object coding and of how animation works. Alvingwong provided the link for the latter; for a tutorial on object coding, try http://dennislance.zoomshare.com/1.html, http://bve.altervista.org/guide.html, or http://www.bvestation.com/forums/index.php?board=87.0.

thank you, i will go try now
tpclhk
 
Posts: 7
Joined: Tue, 19th May 2009, 13:41

Re: i want to make my platform screen doors move plz help

Postby UCR683 on Fri, 22nd May 2009, 12:23

tpclhk said he wanted to find animated object codes for opening and closing platform screen doors and train doors synchronously, when the train arrived to station platforms with platform screen doors installed.
UCR683
 
Posts: 23
Joined: Thu, 5th Jun 2008, 04:16
Location: Hong Kong, China

Re: i want to make my platform screen doors move plz help

Postby tpclhk on Fri, 22nd May 2009, 15:06

UCR683 wrote:tpclhk said he wanted to find animated object codes for opening and closing platform screen doors and train doors synchronously, when the train arrived to station platforms with platform screen doors installed.

yes, he is right
tpclhk
 
Posts: 7
Joined: Tue, 19th May 2009, 13:41

Re: i want to make my platform screen doors move plz help

Postby alvinwong on Mon, 25th May 2009, 17:41

If you know how to, you may just copy from the train object, or just wait for other BVEHK forummers to post their work out!

It is really not easy for people who don't know much on programming to write the script, so I would like to write a program to help cnstructing the code, after finishing K-Train.
Problems, solutions, problems, solutions...
Tired on these, and trying to make openBVE train Exterior, then...
Problems... ###again### Crazy...
Please visit http://www.hochun.nets.hk/discuz/index.php
User avatar
alvinwong
 
Posts: 228
Joined: Sat, 24th Jan 2009, 05:16
Location: Hong Kong


Return to Developing for openBVE

Who is online

Users browsing this forum: No registered users and 0 guests