The Official Scripting Ask Thread
@BenHenryC : U mean like this : https://www.youtube.com/watch?v=MJyqxX6wnoU
@MrRC: yes! Is there any download or documentation of something like that?
@ BenHenryC : I made this from the script made by Yedrimas, the Moonbuggy (for example Phantom Manor). Due an HDD crash i don't have this park and script any more.
But i used this script in another coaster (F.L.Y.) so i can work from there.
Shall i make a very small and simple coaster, so u can see how it works ?
@ MrRC : that would be really great—yes, please. And thank you!!
Hello everyone,
Is it possible to extract movement data of the cart using a script? I want to extract its 6DOF information, such has heave, roll, etc.
Has anyone done it already or if not, is it possible to do it?
Thank you everyone in advance.
Metaverum posted on December 5th, 2020
Hello everyone,
Is it possible to extract movement data of the cart using a script? I want to extract its 6DOF information, such has heave, roll, etc.
Has anyone done it already or if not, is it possible to do it?
Thank you everyone in advance.
I assume u mean a single coach of a train ?
Hello everyone is there a script where I can make an array of an object, say a piece of an LSM I can place on or near the track, something similar to theCodeMaster's LSM kit?
HyperRushProductions posted on December 14th, 2020
Hello everyone is there a script where I can make an array of an object, say a piece of an LSM I can place on or near the track, something similar to theCodeMaster's LSM kit?
U can take that kit and take out of it what u need.
To make it suitable for your purpose.
I've seen a few people asking about multimoves lately. I just wanted to say that there is a script for it in the Leviathan recreation on the exchange: https://nolimitscentral.com/exchange/park/958
I'm not sure if it is extractable, but good luck!
Edit: Thank you MrRC!
@ RMC It
Yes its extractable. I downloaded it and extracted it on my system.
Its in full manual mode if u started it.
@ Bestdani :
in my script i wanna do this.
if (trigger == startT1Trig) and (assignedNumber == int 1)
EDIT : changed it in :
private float Type = 1;
if ((trigger == startT1Trig) && (assignedNumber == Type));
so trigger has to be equal on the value in startT1Trig and the value assignedNumber has to equal to 1
but its not the correct way in scripting, can u help me to solve this ?
Hi everyone ! (first of all I have 0 knowledge about scripts) I would like to know if there is a script for track triggers that only activate on a specific train ? The thing I'm trying to do is to activate a light or animated object only when a specific train passes through the track trigger.
For example, I want to activate a blue light when train 1 passes and another green light when train 2 passes without having the blue light to activate when train 2 passes.. Do you think this can be done easily ?
thanks :)
Hi guys!
How would I use getCarOrientationAndPosition()? I'm trying to get the unit vector a train is facing in.
Thanks!
See here :
getCarOrientationAndPosition
getCarOrientationAndPosition( index, nlvm.math3d.Vector3f frontOut, public final void int nlvm.math3d.Vector3f topOut, nlvm.math3d.Vector3f rightOut, nlvm.math3d.Vector3f posOut) Gets the car's orientation unit vectors and position vector. The index goes from front of the train to the back. 0 <= index < getCarCount(). frontOut can be null if no front vector is requested. topOut can be null if no top vector is requested. rightOut can be null if no right-unit vector is requested. posOut can be null if no position vector is requested.
is there a download for the intamin soft straps like intimidation 305 im looking to build a creation of i305
I'm looking for a simple script to make x seconds pause in the script.
MrRC posted on May 14th, 2023
I'm looking for a simple script to make x seconds pause in the script.
EDIT :
Found it
Hello, I don't know if this will be answered but I'm working on a Morgan hyper coaster, and came up with these animated brakes there sill very much a work in progress however i was wandering if I could get help with an attachment script, i went looking through the scripts of a couple other brake/lsm packs, and found this one was very commonly used
'import com.nolimitscoaster.;
import nlvm.math3d.;
public class Brakes extends Script{
SceneObject sco;
public bool onInit(){
sco = sim.getSceneObjectForEntityId(getParentEntityId());
float distance = 1.36f;
int maxlength = Integer.parseInt(sco.getName());
SceneObjectElement[] scoe = new SceneObjectElement[sco.getElementCount()];
Vector3f pos = new Vector3f();
sco.getTranslation(pos);
final float range = 10.f;
TrackPos trackPos = sim.findNearestCoasterTrack(pos, range);
Matrix4x4f location = new Matrix4x4f();
for(int i = 0; i < sco.getElementCount(); i++){
scoe[i] = sco.getElementAt(i);
scoe[i].setVisible(false);
}
for(int i = 0; i < scoe.length && i*distance < maxlength; i++){
location = trackPos.getTrackPosOnCenterRailsWithOffset(i*distance).getCenterRailsMatrix();
scoe[i].setMatrix(location);
scoe[i].setVisible(true);
}
sco.setMatrix(new Matrix4x4f());
return true;
}
}
This, would not work for me, so I would like some help getting the track attachments right, according to blender the model is 2.02M long, and about 0.25M wide, also I made a keyframe animation in blender for the brakes clamping, is there a way I can trigger this to happen when NL2 triggers the (invisible) brakes. Thanks for any and all help. Download souce files https://drive.google.com/file/d/18ZlYzbr8dyjj7-L3IZ5EukspRvy2Lgdn/view?usp=sharing (Brakes.dae, brakes.nl2mat, brakes.blend, brakes.nlvm, MorganBrakes.nl2sco)
I'm not sure if this is possible but I figured I'd ask. I work with programming actual rides/shows and we have some new guys in the office and I find No Limits 2 to be a good training opportunity for people new to the industry. The only issue is that the scripting engine is not like the actual controllers used on real coaster. ie, Programable Logic Controllers, Industrial Computers, Show Controllers, etc.
My vision is that if I could make a script that controls the brakes, lifts, shuttle tracks, and any other ride/show components but doesn't contain any actual sequencing logic and instead references external controllers, then it would be possible to program the virtual coaster using a real controller and use that to control the no limits script. This way you'd have a completely non destructive way to experiment with block zone logic and other control logic.
In the past I was able to reference variables housed in other no limits scripts but I have not come across any way to reference variables in other script types. Does anybody know of a way to reference variables in other script types? I can likely come up with solutions to convert the data from controllers to more common script types so I figured I'd start by seeing if anybody has a way for that.
EDIT : Found it
JBS Custom B&M trains came with station gates script.And got it working.
==================
Who has a script to make custom gates work ? Script must listen to the original gates in the station.
Looking for a script to attach a POV camera to an 3d object, thats not a bogie or coach.
MrRC posted on May 12th, 2024
Looking for a script to attach a POV camera to an 3d object, thats not a bogie or coach.
https://steamcommunity.com/sharedfiles/filedetails/?id=872079550
jakecallan posted on May 16th, 2024
Camera Script was no problem, all 10 seats have now POV camera.
Hi guys I'm a bit of a novice when it comes to NL2 scripting but can anyone tell me how I can script a button to play an off ride sound? Thanks a lot

Hi team! I am certain this has been asked before but forgive me if it has because I searched for it and could not find the answer: has any developed a script for controlling the rotation of a car, or a custom car, something sort of like Escape from Gringotts or more accurately, the upcoming Guardians of the Galaxy coaster? Ideally, something that could work with a custom car? Thanks!