Board index Roller Coaster Games NoLimits Coaster 2 NoLimits Coaster 2 Scripting OffRide audio with trigger?

OffRide audio with trigger?

Post your Nolimits 2 scripts here! Also any discussion regarding scription for NoLimits Coaster 2 should be placed in this forum

Post February 1st, 2017, 1:54 pm

Posts: 102
Points on hand: 1,124.00 Points
Location: the netherlands
Offline
hello, is there a script to play offride audio with a Trigger?

Post February 2nd, 2017, 1:08 pm
herman116 User avatar
Premium Member
Premium Member

Posts: 636
Points on hand: 7,471.00 Points
Location: The Netherlands
Offline
If you've allready got a script which causes a trigger, it's pretty easy.

Use this code to load the file and set the position where it should be played:
StaticSound sound = new StaticSound();
Vector3f position = new Vector3f(0, 0, 0);
sound.loadFromFile("C:/sound.mp3", E_ENVMODE_LOCAL);
sound.setPosition(position);


And use this code when the sound should be played:
sound.play();


I haven't tested this code though!

Sponsors
Did you know? Active community members enjoy an ad-free experience! Learn how ›
  • Rate 80%+ of your downloaded tracks (min 40 downloads)
  • Post at least 10 forum topics or replies in the last 90 days
  • Upload a track in the last 90 days
  • Earn 50,000+ points with a 10+ year account
  • Or become a Premium member

Return to NoLimits Coaster 2 Scripting

 


  • Related topics
    Replies
    Views
    Last post