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

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
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!


Return to NoLimits Coaster 2 Scripting

 


  • Related topics
    Replies
    Views
    Last post