Need Script Example or Ideas - Weedsprayer Control

Discussion of rolling-stock creation & re-painting.

Need Script Example or Ideas - Weedsprayer Control

Unread postby wacampbell » Thu Aug 20, 2015 12:47 pm

So I've had a weedsprayer train car on my workbench for a while, and have been trying to think of a way so I can control the sprayer animation in the game. ie when spray is turned on, the arms swing out and the spray animation appears. When spray is off, the car runs in the consist with everything stowed. What features are available in Railworks to allow me to control this? Can I just map a key for this function and if so how do the messages get passed to this car? Are there any other animated cars that give the user control of the animation that I can use as an example? All suggestions welcome.
Wayne Campbell
wacampbell
 
Posts: 511
Joined: Tue Sep 27, 2011 12:45 pm
Location: BC, Canada

Re: Need Script Example or Ideas - Weedsprayer Control

Unread postby BoostedFridge » Thu Aug 20, 2015 12:59 pm

Hi Wayne!

Ian (Eyein12) has a pair of Hi-Cube boxcars included with his Seattle Route where their doors slide open and closed at a keystroke. They can only be used in conjunction with his SD60M loco, so there must be something in the script that must be in both the car and loco.

Hope that helps.
User avatar
BoostedFridge
 
Posts: 2277
Joined: Sat Aug 24, 2013 6:39 am
Location: Vancouver, BC

Re: Need Script Example or Ideas - Weedsprayer Control

Unread postby Ericmopar » Thu Aug 20, 2015 2:19 pm

Mike Rennie's FEF-3 tender has scripted hatches and tool boxes.
New build. i7-7700k, MSI Z270 Gaming M5 Mobo, Hyper 212 Evo, Corsair DDR4 3200 Mhz RAM, Klipsch Pro Mediea 2.1 Speakers, Samsung 850 Evo SSD, HAF XM Case, Asus Strix GTX 1070 and Cooler Master Storm XT Keyboard.
Slick with Pretty Rainbow Colors.
User avatar
Ericmopar
 
Posts: 2797
Joined: Mon May 13, 2013 12:35 am
Location: Henderson NV.

Re: Need Script Example or Ideas - Weedsprayer Control

Unread postby gtrtroger » Thu Aug 20, 2015 2:21 pm

Dick Cowens Snowplow as a similar function also with swing out snow deflectors.....
User avatar
gtrtroger
 
Posts: 1240
Joined: Mon Jun 30, 2014 7:31 am
Location: Montgomery, Alabama

Re: Need Script Example or Ideas - Weedsprayer Control

Unread postby wacampbell » Thu Aug 20, 2015 6:43 pm

These are all good suggestions, I'll check them out for ideas.

Thanks
Wayne Campbell
wacampbell
 
Posts: 511
Joined: Tue Sep 27, 2011 12:45 pm
Location: BC, Canada

Re: Need Script Example or Ideas - Weedsprayer Control

Unread postby wacampbell » Thu Aug 20, 2015 7:20 pm

Looking at these examples it seems its quite complicated to do.

Loco
Set up a new key in the input mapper for a locomotive
Add a control ( real or virtual ) in the locomotive
Script the loco to hook the control and forward a command message down the consist

Car
Add a script to the sprayer car to capture the command message
and activate the animation

Hmmm..
Wayne Campbell
wacampbell
 
Posts: 511
Joined: Tue Sep 27, 2011 12:45 pm
Location: BC, Canada

Re: Need Script Example or Ideas - Weedsprayer Control

Unread postby ricksan » Wed Aug 26, 2015 12:34 am

Loco
Set up a new key in the input mapper for a locomotive
Add a control ( real or virtual ) in the locomotive
Script the loco to hook the control and forward a command message down the consist

Car
Add a script to the sprayer car to capture the command message
and activate the animation


That's how you do it. Some time ago, Tom Pierce made an RPO car with left and right mail hooks which I scripted to operate using the M and N keys, respectively. This kind of thing only works for locomotive(s) that are set up for this purpose, and any intervening cars have to be scripted to pass the message to the sprayer car. Email me if more info needed.
ricksan
Forum Mod
 
Posts: 311
Joined: Fri Feb 13, 2009 10:55 am
Location: Bandon, OR USA


Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 1 guest