Skip to content

All Comments

19021 to 19040 of 19724

Filter comments

The Official Scripting Ask Thread
Scripting

No, that shouldn't be the case. I declare a variable 'stationSafetySpiel' of type StaticSound on line 11. At line 19, I give this a value (and the value is what I return from the master.getStationSafetySpiel() method). The method getStationSafetySpiel() on line 28 returns the value of the variable of line 11.

This is the method in the master class. So:

  • I declare a private variable stationSafetySpiel on line 11.
  • On line 19 I give this variable a value. The value is equal to whatever I get back from master.getStationSafetySpiel().
  • In the master file, I execute the method (line 152 of the image above), which returns a StaticSound.
  • The variable on line 19 gets that value that gets returned.
View comment
The Official Scripting Ask Thread
Scripting

I'm not an expert but I think in line 19 what you have right now is basically "stationSafetySpiel = stationSafetySpiel" so it's still referring to null.
If I got it right you want to get the stationSafetySpiel from the master object so it should be "return master.stationSafetySpiel" instead of "return this.stationSafetySpiel" in line 29.

Edit: I overlooked 'master.' in line 19 and misunderstood your actual problem. Sorry.

View comment
The Official Scripting Ask Thread
Scripting

I'm having troubles with separate scripts and using resource files in NL2.

My folder structure is like this:

  • Models has all Blender files, separated in different folders for the kind of model (station, misc, launch, etc.).
  • Music has all .ogg files used in NL2. These are loaded with StaticSound.
  • Objects is all exported Blender models and their .nl2sco, .nl2mat and texture files.
  • Pictures is used for reference material.
  • Scripts has all scripts and this folder is divided in subfolders as well.

Because this is a large project, I decided on splitting my script files. This way I'll also work more in the OOP style of programming which I love.

Master.nlvm is the heart of my coaster. This file is attached to my coaster and generates instances of all other classes. The blocks folder obviously has the block controller script, pushcar folder has the script for my pushcar etc. Not too difficult at all.

Now to the problem: I attached the music files (for the onboard audio and other sounds) as resources to my Master.nlvm script file in the coaster, as shown below:

onboardxy where x is the train ID (starting at 0) and y is the soundtrack as each train has 3 soundtracks: idle sound at the launch track (0), dispatch sound from the station (1) and launch+track (2), each file gets triggered when necessary and decided in the block controller. One other soundtrack is stationsafetyspiel which (as the name suggests) is the safety spiel that gets played in the station.

I use the resources to use my sound files. Nowhere do I use absolute paths on my computer. However, it does seem like it when I create a package file and send it to a friend to test it. As you can see in the error below, it's an absolute path which is correct on my PC, but obviously not on others.

This is the current script which loads the safety spiel. The error was first on line 22 (which is now commented out). I thought because the audio file was attached to the master.nlvm script, I had to get the reference through the Master class and pass it back, but that didn't work either.

At this point, I've tried several things now but I have no idea where it goes wrong. Is this a bug with NL2 maybe? Does anyone have a solution for my problem?

If anyone needs more information on something I didn't cover, let me know. I think I covered the important parts.

View comment
3ds Max Track Importer for No Limits 2
NoLimits Coaster

@Jetcoasterfan: You export it as a .DAE file, in No Limits, create a new scene object with the NL2SCO editor and attach the .DAE file there.

@Element 115: That's a good idea, I'll look into it for the next update.

Here's an example of how the track can look when you apply materials:

View comment
Official FVD (Force Vector Design) Thread
NoLimits Coaster

The video is listed as an advanced element. I suggest going through the basics and learning how to use FVD++ and then returning to Shambhala.

NLE’s 6FlagsManiac did some videos, too, including an easier hypercoaster drop. I think his YouTube name was Bjorn. What I remember is his use of a force zone decreasing down to 0g to get a pretty convincing B&M shape.

View comment
19021 to 19040 of 19724