Skip to content

All Comments

3661 to 3680 of 19728

Filter comments

The NoLimits 2 Mega Resource Thread - Guides, Tools, Scripts
NoLimits Coaster

I will look for it.

I assume u mean the actionbutton on your mouse / touchpad to activate (open / close a door) ?

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

public class DoorClick extends Script
{
protected static final float DEG = (float)Math.PI/180.f;
protected String SCRIPT_NAME = "Door";
protected String TURN_NAME = "Door";
protected String HANDLE_NAME = "Handle";
protected float PHI_MAX=-82DEG;
protected float PHI_T=2.f;
protected float PHI_Ta=PHI_T/5.f;
protected float PHI_HANDLE_CLOSE=0
DEG;
protected float PHI_HANDLE_OPEN=-12*DEG;
private bool change = false;
private bool open = false;
private float t=0.f;
private float phi,phiCurrent,phiTarget=0.f;
private Vector3f clickPos = new Vector3f();
private Vector3f dis = new Vector3f();
private SceneObject obj;
private SceneObjectElement turn;
private SceneObjectElement handle;

private bool inv=false;

public bool onInit(){
	obj = sim.getSceneObjectForEntityId(getParentEntityId());
	if(obj==null){
		System.err.println(SCRIPT_NAME + ": Object not found");
		return false;
	}
	turn = obj.getElementForName(TURN_NAME);
	if(turn==null){
		System.err.println(SCRIPT_NAME + ": Element " + TURN_NAME + " not found");
		return false;
	}
	handle = obj.getElementForName(HANDLE_NAME);
	if(handle==null){
		System.err.println(SCRIPT_NAME + ": Element " + HANDLE_NAME + " not found");
		return false;
	}
	clickPos=handle.getAbsoluteMatrix().getTrans();
	return true;
}

public void onNextFrame(float tick)
{
	if(change){
		phi=phiCurrent+(float)Tools.switchRampC1(PHI_T,phiTarget,PHI_Ta,t);
		turn.setRotation(0,phi,0);
		if(t>=PHI_T){
			open=phiTarget==PHI_MAX;
			change=false;
			handle.setRotation(0,0,PHI_HANDLE_CLOSE);
			clickPos=handle.getAbsoluteMatrix().getTrans();
		}
		t+=tick;
		return;
	}
	if(Button.isPressed(Button.ACTION)){
		sim.getViewPos(dis);
		dis.sub(clickPos);
		if(dis.length()>0.9f) return;
		change=true;
		handle.setRotation(0,0,PHI_HANDLE_OPEN);
		t=0.f;
		phiCurrent=phi;
		phiTarget=open?-PHI_MAX:PHI_MAX;
	}
}

}

View comment
NL2 Questions
NoLimits Coaster

There was a comment on Steam that they were working on a update.
Let me search if I can find it...

EDIT:
Here's the picture of the "Update" on Steam:
Question asked at 23-12-2021, repley from nlcoaster on 24-12-2021!!


There will be a update, but what will it be?
I hope vertical lifts, custom switches etc!

(EDIT 2): Why do my images not show in my posts?
Anyways: the link to that post: https://imgur.com/gallery/3R71iFm

(EDIT 3): Maybe because I haven't post enough on this forums :(

View comment
Weird roller coaster dreams you've had
Off Topic

Last night I dreamed I was riding Top Thrill Dragster (which for some reason was reopened after the accident) and the launch was a bit too weak to make it even over halfway or 2/3 up the top hat so we rolled back down and for some reason we continued on through the station which for some reason was a dual loading platform and then backward thru the turn into the loading area, and there was also a transfer track that was moved out of the way for some reason so we were heading toward the end of the track, which we flew over without hesitation like RCT and Planet Coaster, and somehow miraculously no one was injured.

View comment
3661 to 3680 of 19728