Scripting a level crossing flagman?

Tips and discussion about scenery creation for RailWorks.

Scripting a level crossing flagman?

Unread postby brucedell » Sat Sep 15, 2018 2:24 pm

Hello. This is my first post on Railworks America, and I've come seeking assistance for the creation of my first asset.
Image
I'm building a turn of the century interurban/streetcar route, and i felt the need to make driving on the route more challenging by minimizing the amount of visual signals for the player to see.
at a certain part of the route the mainline, and the interurban interchanges at a diamond crossover. I felt that having a flagman serve as a visual warning device for the interurban would be a far more immersive way to signify that i need to stop, and wait for a mainline train to pass.
so after 5 days of trial, and error i managed to make a working asset that has 2 animations. one for standing still "open", and one for waving the flag "warn"
Image
However when it comes down to the scripting part i am truly stumped. Mostly because I never worked on the LUA code format before. I'm using the Woodhead Levelcrossing script as a base, but i'm still struggling to make it work even after i dabbled in the code a tiny bit.
however what i basically want to do is this. I have 2 animations i want to loop "open", and "warn". I want the open animation to loop while the level crossing is in the open state, and the warn flag animation to loop while the animation is in the Closed state.
If anyone could assist me on this issue it would be great.
Last edited by brucedell on Sun Sep 16, 2018 10:10 pm, edited 1 time in total.
brucedell
 

Re: Scripting a level crossing flagman?

Unread postby harryadkins » Sat Sep 15, 2018 3:58 pm

Hope you are able to work it out. I'm sure there are those on this forum who are up to the task.

Harry
User avatar
harryadkins
 
Posts: 3106
Joined: Sun Aug 23, 2009 8:01 am
Location: South Carolina, USA

Re: Scripting a level crossing flagman?

Unread postby brucedell » Mon Sep 17, 2018 6:48 pm

Well when it comes down to the coding part. i wasn't able to really get what i wanted, however i was able to get a similar effect, by just extending the animation by 3 minutes, now the asset is functional when triggered by a mainline train.

https://www.youtube.com/watch?v=0PRlcZR_pJg
Last edited by brucedell on Mon Sep 17, 2018 9:47 pm, edited 2 times in total.
brucedell
 

Re: Scripting a level crossing flagman?

Unread postby BoostedFridge » Mon Sep 17, 2018 9:33 pm

Thats pretty impressive.
User avatar
BoostedFridge
 
Posts: 2277
Joined: Sat Aug 24, 2013 6:39 am
Location: Vancouver, BC

Re: Scripting a level crossing flagman?

Unread postby ET44C4 » Tue Sep 18, 2018 7:54 am

Impressive indeed! Great work, sir.
**Not taking any requests**

Santa Fe All The Way
Nothing Runs Like a Deere
No Farms No Food
Ford Powerstroke

My 87 Ford: https://www.youtube.com/channel/UCvNRba ... _tNs53k42w
User avatar
ET44C4
 
Posts: 3187
Joined: Mon Aug 22, 2016 12:01 pm
Location: Clover, South Carolina

Re: Scripting a level crossing flagman?

Unread postby CArailroader » Tue Sep 18, 2018 6:17 pm

That is excellent! Once done do you think you will release this ahead of your route? This would be awesome to have on some routes.
CArailroader
 
Posts: 480
Joined: Fri Sep 16, 2016 9:16 pm
Location: California

Re: Scripting a level crossing flagman?

Unread postby brucedell » Tue Sep 18, 2018 9:22 pm

CArailroader wrote:That is excellent! Once done do you think you will release this ahead of your route? This would be awesome to have on some routes.

I plan to release it along with the route because phase 1 of it is just about complete. I also need to clean up the Asset Directory, to make it easy to share. This should take at least a week or so. I'm going to be posting more details about this route In the Route design section. The route name is southern corridor, and the details post should be uploaded sometime tonight.
brucedell
 


Return to Scenery Design

Who is online

Users browsing this forum: No registered users and 11 guests