Scripting API

Home Scripting API Index Class Overview

com.nolimitscoaster

Class Button


public class Button
extends Object

Class for detecting buttons

Field Summary

static final int ACTION
This is the Left Mouse Button by default
static final int CHANGE_VIEW_MODE
This is the Q key by default
static final int FLY_FASTER
This is the Shift key by default
static final int FLY_SLOWER
This is the Ctrl key by default
static final int MOVE_BACKWARD
This is the S key by default
static final int MOVE_DOWN
This is the X key by default
static final int MOVE_FORWARD
This is the W key by default
static final int MOVE_LEFT
This is the A key by default
static final int MOVE_RIGHT
This is the D key by default
static final int MOVE_UP
This is the Space key by default
static final int NEXT_CAR
This is the C key by default
static final int NEXT_SEAT
This is the V key by default
static final int NEXT_TRAIN
This is the T key by default


Method Summary

static String getAssignedKeyString(int button)
  Returns the assigned keys/buttons as a string.
static bool isPressed(int button)
  Returns true if the button is pressed that is associated with a specific command or key


Field Detail


ACTION

public static final int ACTION

This is the Left Mouse Button by default


CHANGE_VIEW_MODE

public static final int CHANGE_VIEW_MODE

This is the Q key by default


FLY_FASTER

public static final int FLY_FASTER

This is the Shift key by default


FLY_SLOWER

public static final int FLY_SLOWER

This is the Ctrl key by default


MOVE_BACKWARD

public static final int MOVE_BACKWARD

This is the S key by default


MOVE_DOWN

public static final int MOVE_DOWN

This is the X key by default


MOVE_FORWARD

public static final int MOVE_FORWARD

This is the W key by default


MOVE_LEFT

public static final int MOVE_LEFT

This is the A key by default


MOVE_RIGHT

public static final int MOVE_RIGHT

This is the D key by default


MOVE_UP

public static final int MOVE_UP

This is the Space key by default


NEXT_CAR

public static final int NEXT_CAR

This is the C key by default


NEXT_SEAT

public static final int NEXT_SEAT

This is the V key by default


NEXT_TRAIN

public static final int NEXT_TRAIN

This is the T key by default


Method Detail


getAssignedKeyString

public static String getAssignedKeyString(int button)

Returns the assigned keys/buttons as a string.

Parameters:

button - The button constant. See constants for values that can be used.

Returns:
    String that represents the assigned key or mouse button or controller button. Empty string when no keys were assigned.

Since:
    2.0.5.6


isPressed

public static bool isPressed(int button)

Returns true if the button is pressed that is associated with a specific command or key

Parameters:

button - The button constant. See constants for values that can be used.

Returns:
    Returns true if the button is currently pressed or was pressed within the last frame.

Since:
    2.0.5.6