Board index Roller Coaster Games NoLimits Coaster 2 [HELP] Horn before leaving station Script

[HELP] Horn before leaving station Script

All discussion relation to NoLimits Coaster 2 should be posted here. Purchase NoLimits Coaster from this page: nolimits-coaster-2-purchase-and-upgrade-links-t32524.html

Post February 11th, 2014, 5:34 pm

Posts: 17
Points on hand: 170.00 Points
Location: Brazil

I'm recreating this coaster

http://youtu.be/jSz1cCjUjyw?t=26s

So I need to do a script that plays an audio between closing the harness and leaving the station.

Close harness
Play audio until the end
Leave the station

Just like dive coaster station!

Post February 11th, 2014, 8:11 pm

Posts: 151
Points on hand: 374.00 Points
Location: Virginia, USA
There are two ways to do it, one easy and one hard, but neither will play the sound until the train starts moving.

The Easy Way:
This works in Automatic mode and requires setting a Trigger in front of the train as it sits in the station. The sound will play as soon as the train hits the trigger. It requires slight modifications to these two files: coaster name, sound file name, and trigger name need to be changed.

http://pastebin.com/jzqsGBnn
http://pastebin.com/Sx0YWy8c

Those two scripts set the Trigger location in the script, but it is easier to do it in Editor mode and just delete the lines creating the trigger point from the script.


The Hard Way:
This requires the coaster to be in Scripted mode. The way you would do it is to poll the station and see if the train was ready to leave. If the answer is yes, play the sound. This is the more accurate of the two methods since it starts playing as soon as the train is ready. This may sound easy, but being in Scripted mode comes with extra coding overhead, such as operating the brakes, checking to see if train is at the station, etc.... I don't recommend it just for playing a sound.

Post February 11th, 2014, 10:12 pm
TTD03 User avatar
True Addicts
True Addicts

Posts: 7306
Points on hand: 738.00 Points
Bank: 111,265.11 Points
Hey!
Those are my pastebins!
Only noticed cause Wicked Twister is the track name which is what I had the name set to when I uploaded them [sillyme]

Post February 11th, 2014, 10:46 pm

Posts: 151
Points on hand: 374.00 Points
Location: Virginia, USA
Didn't know who they belonged to. I knew they were posted here at one time, but I didn't know where they came from. A modified version of them is being used in the script for my track switching coaster. I removed the sound file code since I'm not using that and replaced the in code trigger definition with an editor placed Trigger because it's simpler and can be moved around without editing code, then, of course, I folded it into the rest of my code.

Post February 12th, 2014, 12:52 am
TTD03 User avatar
True Addicts
True Addicts

Posts: 7306
Points on hand: 738.00 Points
Bank: 111,265.11 Points


Return to NoLimits Coaster 2

 


  • Related topics
    Replies
    Views
    Last post
cron