Scripted Animation in a Scenery Object

Tips and discussion about scenery creation for RailWorks.

Scripted Animation in a Scenery Object

Unread postby wacampbell » Sun Oct 12, 2014 3:04 pm

I built a carousel for the beach terminal on my London and Port Stanley route and am trying to figure out how to control the animation via a script.

In my first attempt I created an 'Anim scenery blueprint' for the carousel and succesfully animated the horses so they ran continuously.

But I want to have a script control the animation, to cycle the carousel and make it so it doesn't run after midnight or in the winter.

So for my second attempt, I created a 'Scripted scenery blueprint'. It successfuly enabled me to control the visibility of the winter cover etc ( so I know the script was running ) but the horses weren't animated, and the script had no control of them. This is expected since the 'Scripted scenery blueprint' has no entry for 'Animation sets' .

So I am stuck. It seems 'Animated Scenery' can't have a script, and 'Scripted Scenery' can't have animation. What am I missing?

Thanks

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

Re: Scripted Animation in a Scenery Object

Unread postby wacampbell » Tue Oct 14, 2014 4:19 pm

Well this turned out to be an interesting excersize. I ended up using an Animated Signal Blueprint for my Carousel model. This allowed me to attach animation, a script, and sounds. I'd still like to find a better solution, since it meant I had to link the Carousel to a nearby section of track. I just ignored any track messages in my Carousel script.

So here's what I ended up with. The scripting is quite powerful. The carousel is open 10am to 10pm, runs about 2 minutes with a 5 minute wait between runs. The carousel music only plays when the carousel is running. At dark, the lights come on in the carousel. At 10pm, the security curtains go up until 10 the next morning. And in the winter, the carousel is silent and is boarded up for protection. I guess its a bit much for a scenery object, but it is directly adjacent to the tracks, and the excersize served as a good learning for this type of thing.

Here's some pictures:

Daytime Running
Image3.jpg


Nightime Running
Image1.jpg


Nightime Shutdown
Image2.jpg


Boarded Up for Winter
Image4.jpg


I am happy to share the scripts and blueprints etc with anyone who wants to do something similar.
You do not have the required permissions to view the files attached to this post.
Wayne Campbell
wacampbell
 
Posts: 510
Joined: Tue Sep 27, 2011 12:45 pm
Location: BC, Canada

Re: Scripted Animation in a Scenery Object

Unread postby Bananarama » Tue Oct 14, 2014 5:28 pm

Wow - that quite a bit of fiddling to find a work around. Nice work!

BTW, have you animated any part of the roller coaster?
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Scripted Animation in a Scenery Object

Unread postby wacampbell » Tue Oct 14, 2014 7:04 pm

Hack wrote:BTW, have you animated any part of the roller coaster?


I am thinking about it. But no not yet.

But I think I can use this scripted scenery technique for a number of things so I wanted to spend the effort to work it out.
Wayne Campbell
wacampbell
 
Posts: 510
Joined: Tue Sep 27, 2011 12:45 pm
Location: BC, Canada

Re: Scripted Animation in a Scenery Object

Unread postby PapaXpress » Tue Oct 14, 2014 7:23 pm

Why not use a road ribbon and hide the ends under a canopy?
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Scripted Animation in a Scenery Object

Unread postby dfcfu342 » Tue Feb 10, 2015 8:32 pm

Or just lay a track piece underground below the carousel to connect it to so it doesn't interfere with your track or show up on the ribbon in the HUD.
dfcfu342
 
Posts: 241
Joined: Sun Jul 22, 2012 1:42 pm

Re: Scripted Animation in a Scenery Object

Unread postby nymr1 » Tue Aug 04, 2015 9:48 am

wacampbell, I am working on something similar to your carousel in which i'm trying to get around the scripting but your script may help me for my project. It would be helpful if you could send a copy to my email, which is ************************

Thanks Jake (nymr1)


* email removed by admin
nymr1
 

Re: Scripted Animation in a Scenery Object

Unread postby Bananarama » Tue Aug 04, 2015 4:19 pm

nymr1 wrote:wacampbell, I am working on something similar to your carousel in which i'm trying to get around the scripting but your script may help me for my project. It would be helpful if you could send a copy to my email, which is *******************************

PM would have been more effective. *!rolleyes!*
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Scripted Animation in a Scenery Object

Unread postby RudolfJan » Mon Nov 02, 2015 2:59 pm

Nice, it is even possible to have trains interact with scripted scenario items. I know about one example. The horse shoe curve route uses a scripted fireworks, that can be controlled from the scenario.
Rudolf

http://www.hollandhiking.nl/trainsimulator
Here you will find the latest version of the Senario Authors Guide, TSW starters Guide, LuaCreator and TSWTools and more ...
RudolfJan
 
Posts: 134
Joined: Sun Jun 28, 2009 1:36 pm
Location: Netherlands


Return to Scenery Design

Who is online

Users browsing this forum: No registered users and 1 guest