coasterlover420 Posted February 4, 2014 Posted February 4, 2014 Try defining the vector separately (in the appropriate places) private Vector3f vectorName = new Vector3f(0,0,0); private Vector3f vectorName2 = new Vector3f(0,0,0); ... vectorName = Vector3f(0,time2,0); vectorName2 = Vector3f(0,0-time2,0); ... sco1.setRotation(vectorName); sco2.setRotation(vectorName2); etc...
Projektion Posted February 4, 2014 Posted February 4, 2014 I'm afraid it didn't work, it left me with the error as: "error C60: Unknown method: vector3f(int,float,int)". However, it kind of pointed me in the right direction, with some slight adjustments (instead of just using the figure 1.501, I define it as give it the value of time2 when it reaches 1.501, and somehow it worked). case STATE_ROTATION: time2 += sim.getCurSimulationTickSec()/4; sco1.setRotation(0, time2, 0); sco2.setRotation(0, -time2, 0); if (time2 >= 1.501) { test = time2; sco1.setRotation(0, test, 0); sco2.setRotation(0, -test, 0); time2 = 0; state = STATE_PLAYING; } break; Now it's just a case of figuring out why "onNextFrame" stops processing.
Projektion Posted February 6, 2014 Posted February 6, 2014 Sorry about the double post. I think I've found out the reason why the state isn't updating in onNextFrame section of my script. For some reason, even though in the onTrainEntering section I am declaring state as STATE_ROTATION, the onNEXTFRAME section just seems to ignore it. This is the bit of the script I'm using that is giving me the trouble (the (YES) and (NO) system error commands aare just there so I can keep track of what is happening in the script) public void onTrainEntering(TrackTrigger trigger, Train train) { state = STATE_ROTATION; switch (state) { case STATE_IDLE: break; case STATE_ROTATION: { System.err.println("(YES)"); } } } public void onNextFrame(float tick) { switch (state) { case STATE_IDLE: { if (stater == 0){ System.err.println("(NO)"); } if(stater >= 1) { state = STATE_ROTATION; System.err.println("(YESyes)"); } } break; And this was the result: As long as state is STATE_IDLE, it will constantly print (NO), that single (YES) is the switch in "onTrainEntering" saying state has been changed to STATE_ROTATION
coasterlover420 Posted February 7, 2014 Posted February 7, 2014 Can you please post your script in its entirety again? It's hard to find anything with a tiny little bit of a script, as it appears you don't even have a STATE_ROTATION in your onNextFrame...also, where did this variable "stater" come from?
Projektion Posted February 7, 2014 Posted February 7, 2014 That was just me experimenting ways to try and get it to work that I forgot to clean up. import com.nolimitscoaster.*; public class showTrigger extends Script implements TrackTriggerListener { private static final String scoName1 = "DoorRight"; private static final String scoName2 = "DoorLeft"; private SceneObject sco1; private SceneObject sco2; private float time1 = 0; private float time2 = 0; private float pause1 = 0; private float pause2 = 0; private static final int STATE_IDLE = 0; private static final int STATE_ROTATION = 1; private static final int STATE_BACK_ROTATION = 2; private static final int STATE_PLAYING = 3; private int state; public showTrigger() { } public bool onInit() { sco1 = sim.getSceneObject(scoName1); sco2 = sim.getSceneObject(scoName2); if (sco1 == null) { System.err.println("Object Not Found (sco1)"); return false; } if (sco2 == null) { System.err.println("Object Not Found (sco2)"); return false; } stater = 0; state = STATE_IDLE; return true; } public void onTrainEntering(TrackTrigger trigger, Train train) { state = STATE_ROTATION; switch (state) { case STATE_IDLE: break; case STATE_ROTATION: { System.err.println("(YES)"); } } } public void onTrainLeaving(TrackTrigger trigger, Train train) { } public void onNextFrame(float tick) { switch (state) { case STATE_IDLE: { System.err.println("(NO)"); } break; case STATE_ROTATION: System.err.println("Object Not Found (YESyes)"); time2 += sim.getCurSimulationTickSec()/4; sco1.setRotation(0, time2, 0); sco2.setRotation(0, -time2, 0); if (time2 >= 1.57079633) { pause1 = time2; sco1.setRotation(0, pause1, 0); sco2.setRotation(0, -pause1, 0); time2 = 0; state = STATE_PLAYING; } break; case STATE_BACK_ROTATION: time2 += sim.getCurSimulationTickSec()/4; sco1.setRotation(0, pause2-time2, 0); sco2.setRotation(0, -pause2+time2, 0); if (time2 >= 1.57079633) { sco1.setRotation(0, 0, 0); sco2.setRotation(0, 0, 0); state = STATE_IDLE; } break; case STATE_PLAYING: { time2 += sim.getCurSimulationTickSec(); if (time2 >= 56) { pause2 = pause1; time2 = 0; state = STATE_BACK_ROTATION; } } break; } } } Each of the "System.err.println" from "onTrainEntering" and below are just there to tell me if it's working (NO = state is still idle, YES = state has been changed to rotation, YESYES = STATE_ROTATION is actually playing out).
COASTER FREAK 11 Posted February 7, 2014 Posted February 7, 2014 So, I know nothing about scripting, but I want to know if anyone has created an Elevator yet? If so, and they are willing to share it, Id appreciate your help. Thanks!
SFOGdude25 Posted February 9, 2014 Posted February 9, 2014 I'm currently not able to save a track element. When I try to do so, a message comes up saying "Cannot save Element file (Cannot open XML-File for writing)." I'm not sure how to fix this.
coasterlover420 Posted February 9, 2014 Posted February 9, 2014 ^^This is not possible as of yet. ^Depending on where you are trying to save the element, you may not have proper permissions. Try saving in your com.nolimitscoaster.nolimits2 folder
COASTER FREAK 11 Posted February 9, 2014 Posted February 9, 2014 ^^This is not possible as of yet. ^Depending on where you are trying to save the element, you may not have proper permissions. Try saving in your com.nolimitscoaster.nolimits2 folder I thought anything was possible with the scripting if someone created it.
Projektion Posted February 9, 2014 Posted February 9, 2014 So, I know nothing about scripting, but I want to know if anyone has created an Elevator yet? If so, and they are willing to share it, Id appreciate your help. Thanks! It's sort of possible at the moment if you use a transfer table in a specific way. The downside is that your train would be on it's side instead of upright,
coasterlover420 Posted February 9, 2014 Posted February 9, 2014 The downside is that your train would be on it's side instead of upright, That's the point.
B&MBoy1982 Posted February 11, 2014 Posted February 11, 2014 Sooo, I pretty much figured everything out for constructing the coasters except water brakes. Anyone figure this out yet?
coasterlover420 Posted February 11, 2014 Posted February 11, 2014 ^If you mean a splash i.e. Diamondback or Griffon, there is a folder in the scenery index called "Splash" and the effect is in there along with the trenches.
COASTER FREAK 11 Posted February 12, 2014 Posted February 12, 2014 So, I know nothing about scripting, but I want to know if anyone has created an Elevator yet? If so, and they are willing to share it, Id appreciate your help. Thanks! It's sort of possible at the moment if you use a transfer table in a specific way. The downside is that your train would be on it's side instead of upright, I have tried that, I was hoping i'd be able to turn it on its side, and then bank the track at 90* and make it, but there is no bank option for the table. GAH!
SFOGdude25 Posted February 15, 2014 Posted February 15, 2014 Is there a way to raise the water level over a specific section of terrain at all?
coasterlover420 Posted February 15, 2014 Posted February 15, 2014 ^Technically no, but there is a scene object representing water that you can place wherever you want.
Jon Sabo Posted February 16, 2014 Posted February 16, 2014 Hello all! I have a nagging issue on one of my NL2 designs. I am doing a design with a Maurer-Sohne concept/idea. I completed the track work and fine-tuning the track and now adding supports. Everything was working well (during test runs), until I had the idea of playing around with different train configurations. Recently, I have been going back and forth with idea of a single car and a double-car train. I decided to do a single car train (3 trains now) and everytime I play the ride the 1st train comes back to the station and stops in the final block brake before the station and does NOT move. I have dual-loading/unloading in the station. What am I missing? Anyone can assist would be helpful. -Thanks in advance!
coasterlover420 Posted February 16, 2014 Posted February 16, 2014 ^Are you referring to using a block script, or you mean this is happening in the NL default block mode?
Jon Sabo Posted February 16, 2014 Posted February 16, 2014 I believe it is a block script. I get an error message that the next train is occupying the same block (and the 2nd train is not stopping in the mid-course block brake. I did not write a specific script for the ride (I still am trying to learn how to write custom scripts). It is running in default mode I believe. I changed some of the block brake and station parameters when I had the 2-car train and then I (thought) I changed the parameters back to original form when I went back to single car train. Also, I noticed that the 2nd train in the station would unload/load, then move up to the 1st part of the station and open the harnesses again.
coasterlover420 Posted February 16, 2014 Posted February 16, 2014 I believe it is a block script. I get an error message that the next train is occupying the same block (and the 2nd train is not stopping in the mid-course block brake. I did not write a specific script for the ride (I still am trying to learn how to write custom scripts). It is running in default mode I believe.I changed some of the block brake and station parameters when I had the 2-car train and then I (thought) I changed the parameters back to original form when I went back to single car train. Also, I noticed that the 2nd train in the station would unload/load, then move up to the 1st part of the station and open the harnesses again. Make sure if you have two stations (load and unload) the second one is unload only. If you are getting an error for two trains on one block, you may have a brake section that begins too late or is not strong enough.
Jon Sabo Posted February 17, 2014 Posted February 17, 2014 ^Found the block brake error. I went back to each one and found the mistake. Thanks! It was a simple error, but forgot to change the original setting from previous version....duh-me!
soldier148 Posted February 19, 2014 Posted February 19, 2014 How can I lower the terrain without making water? I'm doing an inverted coaster that looks similar to Black Mamba.
coasterlover420 Posted February 19, 2014 Posted February 19, 2014 ^Raise your coaster much higher, then form the terrain around it
boughtontroy Posted February 24, 2014 Posted February 24, 2014 I was opening up No Limits 2, until I came across this. Please help me?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now