The Official Scripting Ask Thread
Is the file ReverchonMaster in a sepperated map then in your parkfile map ?
Can u make an image from your directory structure just from Jamp Up Land ?
U have to select the correct class (directory) in your NL2SCO editor
drice posted on March 23rd, 2020
I there a way to implement the track trigger listener into a block script?
Add the implements TrackTriggerListener to your block script class, then implement both methods (onTrainEntering and onTrainLeaving).
When declaring the TrackTriggers itself, you have to say: myTrackTrigger.addTrackTriggerListener(this);
^^
Keep the files where they were intented do be. They should be in the Reverchon directory at the root of your park. Use the provided Car.nl2sco file. If this still doesn't work, send a screen of the script tab of the Car.nl2sco.
Files seem to be in the AhrendDriftingCoaster/Reverchon instead of Reverchon only.
Where your NL2SCO ? your object files like seats / harnas from your coaster parts ?
Here. In the reverchon folder.

U have to find what NL2SCO using ReverchonMaster.nlvm
U have to tell in the NL2SCO file the correct location (Directorymap) where the ReverchonMaster is located.

Class Path = Directorymap of ReverchonMaster.nlvm
You mean directory folder?
Jetcoasterfan posted on March 29th, 2020
You mean directory folder?
Yes sorry my mistake
Should I move the Reverchon folder to my main Jamp Up Land folder?
Yup. But first remove all instances of the scripts (cars, bogies and the one attached to your coaster). Move the directory (Reverchon) to the root, and re-add the objects and the script back. This should do the trick.
It still gets that same error but it now attaches. I just removed the AhrendDriftingCoaster/Reverchon folder and put it to my desktop.

Will this help?
@ Drew do as Yedrimas is advices and then run the park again to see if their any errors
It still has the Reverchon Master error. Can you manually add the reverchon trains to Jamp Up Land then? I can send you just the park. You cannot download the original swinging trains anymore anyway. I think they were removed off of the workshop.
@ Drew yes send me the Package file of your park and i will fix that for u
Case closed , all problems solved
Hello everyone, I'm fairly new to scripting with NL2 and with this type of language so bear with me. I have a successful script that I'm trying add to. Currently it will only acknowledge one track trigger that displays text. I'm trying to add another trigger to this but can't figure it out. Initially I just copy pasted a new section but that failed and I can't figure out how to integrate another trigger and have additional text appear. Whenever I add in a line it just says that line has a syntax error and that's it. Any ideas?
import com.nolimitscoaster.*;
class HelloScript extends Script implements TrackTriggerListener
{
Coaster coaster;
Section section;
bool onInit(){
coaster = sim.getCoasterForEntityId(getParentEntityId());
TrackTrigger trackTrigger = coaster.getTrackTrigger("Trigger1");
trackTrigger.addTrackTriggerListener(this);
return true;
}
void onNextFrame(float tick) {
}
public void onTrainEntering(TrackTrigger trigger, Train train) {
System.err.println("Occupy B Block");
}
public void onTrainLeaving(TrackTrigger trigger, Train train) {
System.err.println("Clear A Block");
}
}
First of all, create a global TrackTrigger variable, under the Coaster coaster and Section section variables. So move the first TrackTrigger trackTrigger to there.
Then in the onInit, you do trackTrigger = coaster.getTrackTrigger("Trigger 1").
Do the same for other tracktriggers, like TrackTrigger trigger2.
Then on the onTrainEntering and onTrainLeaving methods, check which of the triggers has been triggered. You simply do this by: if (trigger == trackTrigger2) { //ACTION }
Thanks for the help thimok. I'm having trouble with the reworked code at this line: if(trackTrigger == trackTrigger2){. Just says syntax error. Where did I go wrong?
import com.nolimitscoaster.*;
class TestScript extends Script implements TrackTriggerListener
{
Coaster coaster;
Section section;
TrackTrigger trackTrigger;
TrackTrigger trackTrigger2;
bool onInit(){
coaster = sim.getCoasterForEntityId(getParentEntityId());
trackTrigger = coaster.getTrackTrigger("StationClear");
trackTrigger2 = coaster.getTrackTrigger("BBlockClear");
trackTrigger.addTrackTriggerListener(this);
return true;
}
void onNextFrame(float tick) {
}
public void onTrainEntering
if(trackTrigger == trackTrigger2){
System.err.println("Occupy B Block");
break
if(trigger == trackTrigger) {
System.err.println("StationClear");
break
}
}
Hi, you have not only one but several syntax errors in your code and you also have several semantic errors in your code as well. The script interpreter is only capable of detecting the syntactical one by one and after that has been solved it would print the next error due to missing method parameters that you have not properly implemented the TrackTriggerListener interface.
Because of all of this, I strongly recommend you start with some guided introduction first before you continue with this script. You can find one from myself here: How To Start With Scripting.
Since there were way too many errors to go through them one by one and explain these here, I can post the correct version of your script for reference after you got familiar with the basics so that you can compare and spot all the errors in your first try yourself then:
import com.nolimitscoaster.*;
class TestScript extends Script implements TrackTriggerListener {
Coaster coaster;
Section section;
TrackTrigger trackTrigger;
TrackTrigger trackTrigger2;
bool onInit() {
coaster = sim.getCoasterForEntityId(getParentEntityId());
trackTrigger = coaster.getTrackTrigger("StationClear");
trackTrigger2 = coaster.getTrackTrigger("BBlockClear");
trackTrigger.addTrackTriggerListener(this);
trackTrigger2.addTrackTriggerListener(this);
return true;
}
void onNextFrame(float tick) {
}
public void onTrainEntering(TrackTrigger trigger, Train train) {
if (trigger == trackTrigger2) {
System.err.println("Occupy B Block");
}
if (trigger == trackTrigger) {
System.err.println("StationClear");
}
}
public void onTrainLeaving(TrackTrigger trigger, Train train) {
}
}
Hi guys, I'd like to know if it is possible to do this on a coaster closed circuit:
- Train launches out of the station
- Train does 3 laps around the track
- Train comes back toward the station, passes trough the station and launch section at full speed
- Rolls back on the hill following the launch
- Come backward on the launch section and is slowed by the launch + the station
- Train is placed into the station getting ready for boarding and being launched again.
Thanks for your help!
Hi AceD-Fe,
Thats possible with the right script.
MrRC posted on April 7th, 2020
Hi AceD-Fe,
Thats possible with the right script.
Is there any way I can have some help please?
Thats for me to complicated



Welcome to NoLimits 2 (2.6.0.1 Windows x86_64)
Renderer: D3D11
Error: Class not found: ReverchonMaster
...1 error(s), 0 warning(s)
Searched ClassPath:
C:\Users\Drew\Documents\com.nolimitscoaster.nolimits2\Jamp Up Land\AhrendDriftingCoaster\Reverchon
Searched ClassPath:
C:\Users\Drew\Documents\com.nolimitscoaster.nolimits2\Jamp Up Land\AhrendDriftingCoaster\Reverchon
Searched ClassPath:
C:\Users\Drew\Documents\com.nolimitscoaster.nolimits2\Jamp Up Land\AhrendDriftingCoaster\Reverchon
Searched ClassPath:
C:\Users\Drew\Documents\com.nolimitscoaster.nolimits2\Jamp Up Land\AhrendDriftingCoaster\Reverchon
Searched ClassPath:
C:\Users\Drew\Documents\com.nolimitscoaster.nolimits2\Jamp Up Land\AhrendDriftingCoaster\Reverchon
Searched ClassPath:
C:\Users\Drew\Documents\com.nolimitscoaster.nolimits2\Jamp Up Land\AhrendDriftingCoaster\Reverchon
Press E to enter Train
Walk View
Press H for Quick Help
Pause on
Pause off
Waiting for scripts to finish...