Page 1 of 1

Scripted Animation in a Scenery Object

Unread postPosted: Sun Oct 12, 2014 3:04 pm
by wacampbell
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

Re: Scripted Animation in a Scenery Object

Unread postPosted: Tue Oct 14, 2014 4:19 pm
by wacampbell
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.

Re: Scripted Animation in a Scenery Object

Unread postPosted: Tue Oct 14, 2014 5:28 pm
by Bananarama
Wow - that quite a bit of fiddling to find a work around. Nice work!

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

Re: Scripted Animation in a Scenery Object

Unread postPosted: Tue Oct 14, 2014 7:04 pm
by wacampbell
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.

Re: Scripted Animation in a Scenery Object

Unread postPosted: Tue Oct 14, 2014 7:23 pm
by PapaXpress
Why not use a road ribbon and hide the ends under a canopy?

Re: Scripted Animation in a Scenery Object

Unread postPosted: Tue Feb 10, 2015 8:32 pm
by dfcfu342
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.

Re: Scripted Animation in a Scenery Object

Unread postPosted: Tue Aug 04, 2015 9:48 am
by nymr1
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

Re: Scripted Animation in a Scenery Object

Unread postPosted: Tue Aug 04, 2015 4:19 pm
by Bananarama
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!*

Re: Scripted Animation in a Scenery Object

Unread postPosted: Mon Nov 02, 2015 2:59 pm
by RudolfJan
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.