Hi all,
Is it possible to read keyboard input in NL2 scripts? So I can use certain keys to switch tracks, hide or show scenery, play audio etc.
Or, thinking ahead, to read a value from a file?
Would love to hear your suggestions
JK
import com.nolimitscoaster.*;
public class keyListener extends Script{
public bool onInit(){
return true;
}
public void onNextFrame(float t){
if(Button.isPressed(Button.ACTION)){
System.out.println("Mouse Button Pressed!");
}
}
}
import com.nolimitscoaster.*;
public class keyListener extends Script{
private String mKey;
public bool onInit(){
mKey = Button.getAssignedKeyString(Button.ACTION);
System.out.println("mKey = " + mKey);
return true;
}
public void onNextFrame(float t){
}
}
Return to NoLimits Coaster 2 Scripting