Jump to content
  TPR Home | Parks | Twitter | Facebook | YouTube | Instagram 

The Official NoLimits/NL2 Help Thread


Recommended Posts

Save the N2 track as a nl1 element, then import it directly into NL2 using element>Add Element

 

I have tried that but it doesn't work… I also tried importing the N2 track into NL1 and saving it as a coaster, then importing the coaster into NL2 and no success there either… I tried search the ever so helpful YouTube, but alas, no tutorials…

Link to comment
Share on other sites

  • Replies 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...

Has anyone had this problem pop up before? It seems that the pipes and footers are not rendering properly, leaving a rather ugly connection. This is happening to a few footers that I have that are a bit closer to the ground, but not so close that it should cause this. Currently running the latest version 2.0.5.2.

 

2014-09-13_00003.thumb.jpg.90dcfba7618eb7c95240cc72a01d58a8.jpg

 

It seems to only happen when the footer and support meet at what looks like less than 45 degree angle as it goes away as I move the footer closer to the vertical support and increasing the angle. I don't ever remember having this issue before, even though it's been a few months since I've used NL2.

Link to comment
Share on other sites

  • 4 weeks later...

I'm having a bit of trouble with a script I am working on, the lines I've bolded are giving my Nullpointerexception errors and I can't see why

 

import com.nolimitscoaster.*;
import nlvm.math3d.*;

public class Skyjump extends Script
{
 private SceneObject sco;
 private SceneObjectElement pistonA[];
 private SceneObjectElement pistonB[];
 
 private static final int gondolaCount = 9;
 
 	private Matrix4x4f pistonMatrix1A[] = new Matrix4x4f[gondolaCount];
private Matrix4x4f pistonMatrix1B[] = new Matrix4x4f[gondolaCount];
private Matrix4x4f pistonMatrix2A[] = new Matrix4x4f[gondolaCount];
private Matrix4x4f pistonMatrix2B[] = new Matrix4x4f[gondolaCount];
private Vector3f TargetPosA[] = new Vector3f[gondolaCount];
private Vector3f TargetPosB[] = new Vector3f[gondolaCount];
private Vector3f OriginPosA[] = new Vector3f[gondolaCount];
private Vector3f OriginPosB[] = new Vector3f[gondolaCount];



 
  public bool onInit()
 {
   sco = sim.getSceneObjectForEntityId(getParentEntityId());

pistonA = new SceneObjectElement[gondolaCount];
pistonB = new SceneObjectElement[gondolaCount];

   for (int i=1; i<gondolaCount; ++i)
{
	pistonA[i] = sco.getElementForName("PistonA" + i);
	pistonB[i] = sco.getElementForName("PistonB" + i);
   }

   return true;
 }
 
 
   public void onNextFrame(float tick)
 {
for (int i=1; i<gondolaCount; ++i)
   {
		//Space Allocation
	Matrix4x4f mRotyA[] = new Matrix4x4f[gondolaCount];
	Matrix4x4f mRotxA[] = new Matrix4x4f[gondolaCount];
	Matrix4x4f mRotzA[] = new Matrix4x4f[gondolaCount];
	Matrix4x4f mRotyB[] = new Matrix4x4f[gondolaCount];
	Matrix4x4f mRotxB[] = new Matrix4x4f[gondolaCount];
	Matrix4x4f mRotzB[] = new Matrix4x4f[gondolaCount];
	
	//Grab position information for the track and target trains
	pistonMatrix1A[i] = pistonA[i].getMatrix();
	pistonMatrix1B[i] = pistonB[i].getMatrix();
	TargetPosA[i] = pistonMatrix1B[i].getTrans();
	TargetPosB[i] = pistonMatrix1A[i].getTrans();
	pistonMatrix2A[i] = pistonA[i].getMatrix();
	pistonMatrix2B[i] = pistonB[i].getMatrix();		
	OriginPosA[i] = pistonMatrix2A[i].getTrans();
	OriginPosB[i] = pistonMatrix2B[i].getTrans();
	pistonMatrix2A[i].initTrans(OriginPosA[i]);
	pistonMatrix2B[i].initTrans(OriginPosB[i]);
	
		//Calculate the rotation of the camera for targeting
	OriginPosA[i].mul(-1.0f);
	OriginPosB[i].mul(-1.0f);
	
	Vector3f SpaceDiffA[] = new Vector3f[gondolaCount];
	SpaceDiffA[i] = OriginPosA[i];
	Vector3f SpaceDiffB[] = new Vector3f[gondolaCount];
	SpaceDiffB[i] = OriginPosB[i];
	
	SpaceDiffA[i].add(TargetPosA[i]);
	SpaceDiffB[i].add(TargetPosB[i]);
	
	float yawA[] = new float[gondolaCount];
	yawA[i] = (float)Math.atan2(-SpaceDiffA[i].x,-SpaceDiffA[i].z);
	float pitchA[] = new float[gondolaCount];
	pitchA[i] = -(float)Math.atan2((float)Math.sqrt(SpaceDiffA[i].x*SpaceDiffA[i].x+SpaceDiffA[i].z*SpaceDiffA[i].z),SpaceDiffA[i].y)+(float)Math.PI/2.0f;
	float yawB[] = new float[gondolaCount];
	yawB[i] = (float)Math.atan2(-SpaceDiffB[i].x,-SpaceDiffB[i].z);
	float pitchB[] = new float[gondolaCount];;
	pitchB[i] = -(float)Math.atan2((float)Math.sqrt(SpaceDiffB[i].x*SpaceDiffB[i].x+SpaceDiffB[i].z*SpaceDiffB[i].z),SpaceDiffB[i].y)+(float)Math.PI/2.0f;
	

 

mRotyA.initYRot(0.5f * yawA);

mRotxA.initXRot(0*(float)Math.cos(yawA));

mRotzA.initZRot(-pitchA*(float)Math.sin(yawA));

mRotyB.initYRot(0.5f * yawB);

mRotxB.initXRot(0*(float)Math.cos(yawB));

mRotzB.initZRot(-pitchB*(float)Math.sin(yawB));

 

	OriginPosA[i].mul(-1.0f);
	OriginPosB[i].mul(-1.0f);
	
	pistonMatrix2A[i].initTrans(OriginPosA[i]);
	pistonMatrix2A[i].multRight(mRotyA[i]);
	pistonMatrix2A[i].multRight(mRotxA[i]);
	pistonMatrix2A[i].multRight(mRotzA[i]);
	pistonMatrix2B[i].initTrans(OriginPosB[i]);
	pistonMatrix2B[i].multRight(mRotyB[i]);
	pistonMatrix2B[i].multRight(mRotxB[i]);
	pistonMatrix2B[i].multRight(mRotzB[i]);
	
	//Apply camera position and rotation
	pistonA[i].setMatrix(pistonMatrix2A[i]);
	pistonB[i].setMatrix(pistonMatrix2B[i]);
	}

 }
}

Link to comment
Share on other sites

  • 2 months later...

I feel really stupid asking this, but is Nolimits 2 a disc or is it a download (like once you pay you download it from the site)? I looked at the website and didn't find anything. (All I found was that the demo was a download)

 

Also, if the computer you downloaded it on crashes and you get another one, is there a way to transfer it to the new computer?

Edited by GCI Wooden
Link to comment
Share on other sites

Hey guys,

I just started using NL2. I built my first basic B&M sit down and would like to publish it to my YouTube page, however I have no idea how to record. Could someone please explain how to film in game? Is there a button on the keyboard or do you use a program like frapps? Thanks, any help would be appreciated.

-Mracsified

Link to comment
Share on other sites

Hey guys....

Happy Holidays (politically correct).

I just starting video editing my own NL2 coaster videos and used Adobe Premier software I downloaded (the Windows Movie maker was really easy, but kept crashing).

I guess my skills are really 'green', but I was able to complete a video and posted it online...my problem or question is...why is the quality so grainy and blah? I thought I saved the settings for HD format, but it does not appear very good quality. My other thought was perhaps due to the night/sunset settings in the video...

Any tips?

Thanks again.

Video:

Link to comment
Share on other sites

Once again, I'm having more scripting trouble:

 

import com.nolimitscoaster.*;
import nlvm.math3d.*;

public class Station extends Script implements TrackTriggerListener
{

private static final String sSoundFile = "StationClick.ogg";
StaticSound sSound;

private static final String sCoastername = "Zeus";

Coaster cMyCoaster;	

private TrackTrigger Trig1;
private TrackTrigger Trig2;
private TrackTrigger Trig3;
private TrackTrigger Trig4;
private TrackTrigger Trig5;
private TrackTrigger Trig6;
private TrackTrigger Trig7;
private TrackTrigger Trig8;

public bool onInit()
{
	cMyCoaster = sim.getCoaster(sCoastername);

	
	
	TrackTrigger Trig1 = cMyCoaster.getTrackTrigger("Trig1");
	TrackTrigger Trig2 = cMyCoaster.getTrackTrigger("Trig2");
	TrackTrigger Trig3 = cMyCoaster.getTrackTrigger("Trig3");
	TrackTrigger Trig4 = cMyCoaster.getTrackTrigger("Trig4");
	TrackTrigger Trig5 = cMyCoaster.getTrackTrigger("Trig5");
	TrackTrigger Trig6 = cMyCoaster.getTrackTrigger("Trig6");
	TrackTrigger Trig7 = cMyCoaster.getTrackTrigger("Trig7");
	TrackTrigger Trig8 = cMyCoaster.getTrackTrigger("Trig8");

	
	Trig1.addTrackTriggerListener(this);
	Trig2.addTrackTriggerListener(this);
	Trig3.addTrackTriggerListener(this);
	Trig4.addTrackTriggerListener(this);
	Trig5.addTrackTriggerListener(this);
	Trig6.addTrackTriggerListener(this);
	Trig7.addTrackTriggerListener(this);
	Trig8.addTrackTriggerListener(this);
	
	sSound = StaticSound.loadFromFile(sSoundFile, StaticSound.E_ENVMODE_GLOBAL);
	sSound.setPosition(new Vector3f(-263.0f, 12.0f, -207.35f));
	sSound.setGain(10.0f);
	
	if(Trig1 == null) {
		System.err.println("Trigger not found");
		return false;
	}
	if(sSound == null) {
		System.err.println("Sound file not found");
		return false;
	}
	
	return true;	
}


public void onTrainEntering(TrackTrigger trigger, Train train)
{
	if (trigger == Trig1 || trigger == Trig2 || trigger == Trig3 || trigger == Trig4 || trigger == Trig5 || trigger == Trig6 || trigger == Trig7 || trigger == Trig8)
	{
		
		sSound.play();
	}
}
 

public void onTrainLeaving(TrackTrigger trigger, Train train)
{
	if (trigger == Trig1 || trigger == Trig2 || trigger == Trig3 || trigger == Trig4 || trigger == Trig5 || trigger == Trig6 || trigger == Trig7 || trigger == Trig8)
	{
		sSound.play();
	}
}
}

 

I just doesn't work. I get no errors, the script finds all the triggers, coaster and sound file fine, it just doesn't play the sounds in the game.

 

Edit: Nevermind, I found a work around and got it working now.

Edited by Projektion
Link to comment
Share on other sites

So, I'm seriously considering buying Nolimits 2, and I installed the demo to try it out. On the demo, there are three coasters that you can play with, and when I was playing with them, it was running at 2-25 FPS. Is there a way to make it run at a higher FPS?

Link to comment
Share on other sites

So, I'm seriously considering buying Nolimits 2, and I installed the demo to try it out. On the demo, there are three coasters that you can play with, and when I was playing with them, it was running at 2-25 FPS. Is there a way to make it run at a higher FPS?

Simple answer: buy a new computer.

 

If it's a fairly cheap laptop that's more than a couple years old, you're not going to be getting any better graphics out of it. If you have a desktop, you can install a new graphics card, but that's a whole different thing. Because NoLimits 2 runs on a graphics engine on par with most modern video games, you'll need a pretty good computer with a good graphics card.

 

If you cannot do any of that, you'll have to adjust the graphics and screen resolution to a lower quality. It may improve performance, but it won't look very good.

 

Even though you might be covered by the minimum specs, here's what I recommend:

 

  • At a minimum, an Intel Core i3 processor will run the game fine, but at least a quad-core i5 is recommended, especially if you plan on recording video.
  • At least 4GB of RAM, 8GB is recommended.
  • Graphics must be desktop-grade, meaning a Nvidia GeForce 750 w/ 2GB of GDDR5 RAM (or higher) or AMD Radeon R7 250 w/ 2GB GDDR5 RAM (or higher) graphics card. An integrated Intel graphics chip will run the game, but performance will be at a loss. The laptop versions of the graphic cards must be higher than a Nvidia GeForce 750M or an AMD Radeon R9 M265X.

 

This is coming from years of experience with building several gaming and workstation computers myself. These specs are pretty much what I'd give to someone that would be looking to buy a decent gaming computer, but might not be able to spend $1500+ on a high-end gaming computer. Can easily build a computer with the specs I listed for around $800 and it would for sure be able to run NoLimits 2 without any issues.

Link to comment
Share on other sites

Once again, I'm having more scripting trouble:

 

import com.nolimitscoaster.*;
import nlvm.math3d.*;

public class Station extends Script implements TrackTriggerListener
{

private static final String sSoundFile = "StationClick.ogg";
StaticSound sSound;

private static final String sCoastername = "Zeus";

Coaster cMyCoaster;	

private TrackTrigger Trig1;
private TrackTrigger Trig2;
private TrackTrigger Trig3;
private TrackTrigger Trig4;
private TrackTrigger Trig5;
private TrackTrigger Trig6;
private TrackTrigger Trig7;
private TrackTrigger Trig8;

public bool onInit()
{
	cMyCoaster = sim.getCoaster(sCoastername);

	
	
	TrackTrigger Trig1 = cMyCoaster.getTrackTrigger("Trig1");
	TrackTrigger Trig2 = cMyCoaster.getTrackTrigger("Trig2");
	TrackTrigger Trig3 = cMyCoaster.getTrackTrigger("Trig3");
	TrackTrigger Trig4 = cMyCoaster.getTrackTrigger("Trig4");
	TrackTrigger Trig5 = cMyCoaster.getTrackTrigger("Trig5");
	TrackTrigger Trig6 = cMyCoaster.getTrackTrigger("Trig6");
	TrackTrigger Trig7 = cMyCoaster.getTrackTrigger("Trig7");
	TrackTrigger Trig8 = cMyCoaster.getTrackTrigger("Trig8");

	
	Trig1.addTrackTriggerListener(this);
	Trig2.addTrackTriggerListener(this);
	Trig3.addTrackTriggerListener(this);
	Trig4.addTrackTriggerListener(this);
	Trig5.addTrackTriggerListener(this);
	Trig6.addTrackTriggerListener(this);
	Trig7.addTrackTriggerListener(this);
	Trig8.addTrackTriggerListener(this);
	
	sSound = StaticSound.loadFromFile(sSoundFile, StaticSound.E_ENVMODE_GLOBAL);
	sSound.setPosition(new Vector3f(-263.0f, 12.0f, -207.35f));
	sSound.setGain(10.0f);
	
	if(Trig1 == null) {
		System.err.println("Trigger not found");
		return false;
	}
	if(sSound == null) {
		System.err.println("Sound file not found");
		return false;
	}
	
	return true;	
}


public void onTrainEntering(TrackTrigger trigger, Train train)
{
	if (trigger == Trig1 || trigger == Trig2 || trigger == Trig3 || trigger == Trig4 || trigger == Trig5 || trigger == Trig6 || trigger == Trig7 || trigger == Trig8)
	{
		
		sSound.play();
	}
}
 

public void onTrainLeaving(TrackTrigger trigger, Train train)
{
	if (trigger == Trig1 || trigger == Trig2 || trigger == Trig3 || trigger == Trig4 || trigger == Trig5 || trigger == Trig6 || trigger == Trig7 || trigger == Trig8)
	{
		sSound.play();
	}
}
}

 

I just doesn't work. I get no errors, the script finds all the triggers, coaster and sound file fine, it just doesn't play the sounds in the game.

 

Edit: Nevermind, I found a work around and got it working now.

 

You do not need your if statements in the onTrainEntering and onTrainLeaving. The only time you would need those is if any trigger behaves differently from the others, but in your case they all do exactly the same thing.

 

I also see you are only having onInit return false if it doesn't find one trigger, not all 8 that you have. Therefore, you don't actually know that the script is not finding the triggers, because onInit returns true even if Trig2 through Trig8 aren't there. A quick work-around that reduces a lot of lines is to implement an array. See below:

 

import com.nolimitscoaster.*;
import nlvm.math3d.*;

public class Station extends Script implements TrackTriggerListener
{
StaticSound sSound;
Coaster cMyCoaster;	
private TrackTrigger[] Trig = new TrackTrigger[8];

public bool onInit()
{
	cMyCoaster = sim.getCoaster("Zeus");

	for (i = 0; i < 8; i++) {
		Trig[i] = coaster.getTrackTrigger("Trig" + (i+1));
		if (Trig[i] == null) {
			System.err.println("Trigger " + (i+1) + " not found");
			return false;
		}
	}
	
	sSound = StaticSound.loadFromFile("StationClick.ogg", StaticSound.E_ENVMODE_GLOBAL);
	sSound.setPosition(new Vector3f(-263.0f, 12.0f, -207.35f));
	sSound.setGain(10.0f);

	if(sSound == null) {
		System.err.println("Sound file not found");
		return false;
	}
	
	return true;	
}


public void onTrainEntering(TrackTrigger trigger, Train train)
{
	sSound.play();
}
 

public void onTrainLeaving(TrackTrigger trigger, Train train)
{
	sSound.play();
}
}

 

Therefore, you have a 45 line code instead of an 80 line code. Also notice I removed sCoasterName and sSoundFile, because they are unnecessary and that just puts two extra objects in memory that don't need to be there and makes your code 2 lines longer.

Link to comment
Share on other sites

Hello everyone,

 

Very happy to find such a place regarding NL game,

 

I have just started discovering scripting in NL2 and still trying to do basic things but need a little push from you.

 

For Example I tried to display the Train Speed by using Train.getSpeed() but I could not reach this till now

 

this is my code which is not working

 

import com.nolimitscoaster.*;
import nlvm.math3d.*;
import nlvm.lang.*;

public class husam extends com.nolimitscoaster.Script
{
private SceneObject sco;
private double myTrainspeed;
Coaster MyCoaster;
Train MyTrain;

public bool OnInit()
{
 MyCoaster = sim.getCoasterForEntityId(getParentEntityId());
if (MyCoaster = null)
{ return false;}

MyCoaster = sim.getCoaster("Coaster1");
MyTrain = MyCoaster.getTrainAt(1);
return True;
}

public void onNextFrame(float tick)
 {
myspeed = Train1.getSpeed();
System.out.println(myspeed);	 
 } 
} 

 

Any Push would be appreciated

Thanks

Link to comment
Share on other sites

I changed some things here. I highlighted them with an arrow.

 

import com.nolimitscoaster.*;
import nlvm.math3d.*;
import nlvm.lang.*;

public class husam extends Script <---------------------
{
private SceneObject sco;
private double myTrainspeed;
Coaster MyCoaster;
Train MyTrain;

public bool onInit() <------------------
{
 MyCoaster = sim.getCoasterForEntityId(getParentEntityId());
if (MyCoaster = null)
{ return false;}

MyCoaster = sim.getCoaster("Coaster1");
MyTrain = MyCoaster.getTrainAt(0); <--------------------------
return True;
}

public void onNextFrame(float tick)
 {
myTrainspeed = MyTrain.getSpeed(); <--------------------------
System.out.println(myTrainspeed); <----------------------------
 } 
} 

 

Hope this helps. This code should work.

Link to comment
Share on other sites

Thank you very much for calcification, I could do many things now , my fault also was in Indexing the Train.

 

One more question, How can I access TrackPos class, There is no object called TrackPos

I tried to access its methods directly but had this error message

 

MyTrackPosMat = TrackPos.getCenterRailsMatrix();

 

Trying to access a non static method from a static context: getCenterRailsMatrix

...1 error(s), 0 warning(s)

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...

Important Information

Terms of Use https://themeparkreview.com/forum/topic/116-terms-of-service-please-read/