Scripting API

Home Scripting API Index Class Overview

com.nolimitscoaster

Class ExternalRideView


public class ExternalRideView
extends Entity

This class is used to work with external ride cameras

Method Summary

void deactivate()
  Deactivates the view
int getCurrentCarIndex(int carCount)
  Returns the current car index. It can be set using setCurrentCarIndex
int getCurrentSeatIndex(int seatCount)
  Returns the current seat index. It can be set using setCurrentCarIndex
bool isActive()
  Returns true if the external view is currently used by the player. This can be used to skip computing the external camera when it is not active.
bool isInWalkMode()
  Checks if the player is in walk mode
void setButtonHelpDescription(int button, String description)
  Sets the description that will shown in the help window for a specific button when the view is active
void setCameraMatrix(nlvm.math3d.Matrix4x4f m)
  Sets the camera transformation for this ride view
void setCurrentCarIndex(int nIndex)
  Sets the current car index. It is a custom value for help reusing the same external camera for multiple cars.
void setCurrentSeatIndex(int nIndex)
  Sets the current seat index. It is a custom value for help reusing the same external camera for multiple seats.
void setEnterWarpPoint(nlvm.math3d.Vector3f pos, float radius)
  Sets the enter warp sphere using a position and radius. The sphere represents the space where the player can enter the external ride view.
void setEnterWarpPointAutoActivate(bool b)
  Sets if the view should be activated automatically when the player is inside the enter warp point
void setEnterWarpPointEnabled(bool b)
  Enables or disables the enter warp sphere. The player cannot enter the external ride view when the sphere is disabled.
void setExitViewAbsolute(bool b)
  Sets the coordinate system mode for the exit view vectors (position and direction).
void setExitViewEnabled(bool b)
  Enables or disables the custom exit view. By default the exit view is disabled.
void setExitViewLookDirection(nlvm.math3d.Vector3f dir)
  Sets the exit view direction vector
void setExitViewPosition(nlvm.math3d.Vector3f pos)
  Sets the exit view position vector
void setLabel(String str)
  Sets a label for this external ride view, it will be shown in play mode when the user is inside the enter warp sphere to inform it can be entered.
void setMorphingEnabled(bool b)
  Enables or disables the morphing in and out of the view. By default, whenever the ride view is enabled or disabled by the user, the current view gets morphed to the


Method Detail


deactivate

public final void deactivate()

Deactivates the view

Behaves similar to a manual view deactivation caused by the player (default key: E)

Since:
    2.5.7.4


getCurrentCarIndex

public final int getCurrentCarIndex(int carCount)

Returns the current car index. It can be set using setCurrentCarIndex

Parameters:

carCount - Maximum number of cars. Will be used to clamp the returned value.

Returns:
    The returned valus is the current car index modulo the carCount parameter.


getCurrentSeatIndex

public final int getCurrentSeatIndex(int seatCount)

Returns the current seat index. It can be set using setCurrentCarIndex

Parameters:

seatCount - Maximum number of seats. Will be used to clamp the returned value.

Returns:
    The returned value is the current seat index modulo the seatCount parameter.


isActive

public final bool isActive()

Returns true if the external view is currently used by the player. This can be used to skip computing the external camera when it is not active.


isInWalkMode

public final bool isInWalkMode()

Checks if the player is in walk mode

If the view is active, the last state is returned that was present before the user switched to the view. If the view is not active, the current state is returned.

Returns:
    true = player is/was in walk mode, false otherwise

Since:
    2.5.2.0


setButtonHelpDescription

public final void setButtonHelpDescription(int button, String description)

Sets the description that will shown in the help window for a specific button when the view is active

Parameters:

button - constant (see class com.nolimitscoaster.Button)
description - text that will be shown for the specified button (set null or empty string to remove description)

Since:
    2.2.5.8


setCameraMatrix

public final void setCameraMatrix(nlvm.math3d.Matrix4x4f m)

Sets the camera transformation for this ride view

Parameters:

m - Camera matrix. Must not be null.

setCurrentCarIndex

public final void setCurrentCarIndex(int nIndex)

Sets the current car index. It is a custom value for help reusing the same external camera for multiple cars.


setCurrentSeatIndex

public final void setCurrentSeatIndex(int nIndex)

Sets the current seat index. It is a custom value for help reusing the same external camera for multiple seats.


setEnterWarpPoint

public final void setEnterWarpPoint(nlvm.math3d.Vector3f pos, float radius)

Sets the enter warp sphere using a position and radius. The sphere represents the space where the player can enter the external ride view.

Parameters:

pos - Center of warp sphere (in meters). Must not be null.
radius - Radius of warp sphere (in meters).

setEnterWarpPointAutoActivate

public final void setEnterWarpPointAutoActivate(bool b)

Sets if the view should be activated automatically when the player is inside the enter warp point

Parameters:

b - true = activate view automatically, false (default) = player needs to manually activate the view

Since:
    2.5.7.4


setEnterWarpPointEnabled

public final void setEnterWarpPointEnabled(bool b)

Enables or disables the enter warp sphere. The player cannot enter the external ride view when the sphere is disabled.


setExitViewAbsolute

public final void setExitViewAbsolute(bool b)

Sets the coordinate system mode for the exit view vectors (position and direction).

By default the vectors are relative to the last ride view coordinate system. It is good practice to change the mode only when the user has switched seats

Parameters:

b - true = absolute world coordinates, false (default) = relative coordinates in coordinate system of last ride view matrix

Since:
    2.5.2.0


setExitViewEnabled

public final void setExitViewEnabled(bool b)

Enables or disables the custom exit view. By default the exit view is disabled.

The exit view will be used when the user exits the ride view, and will be customized using the setExitView... methods. It is good practice to change the mode only when the user has switched seats

Parameters:

b - true = enabled, false = disabled

Since:
    2.5.2.0


setExitViewLookDirection

public final void setExitViewLookDirection(nlvm.math3d.Vector3f dir)

Sets the exit view direction vector

It is not required for the direction vector to be normalized. It is good practice to change the direction only when the user has switched seats.

Parameters:

dir - direction vector, must not be null

Since:
    2.5.2.0


setExitViewPosition

public final void setExitViewPosition(nlvm.math3d.Vector3f pos)

Sets the exit view position vector

It is good practice to change the position only when the user has switched seats.

Parameters:

pos - position vector, must not be null

Since:
    2.5.2.0


setLabel

public final void setLabel(String str)

Sets a label for this external ride view, it will be shown in play mode when the user is inside the enter warp sphere to inform it can be entered.


setMorphingEnabled

public final void setMorphingEnabled(bool b)

Enables or disables the morphing in and out of the view. By default, whenever the ride view is enabled or disabled by the user, the current view gets morphed to the

new view. Using this method that morphing can be disabled. It is good practice to disable morphing when exciting a ride to walk mode does not make sense, e.g. when the user gets moved too far or through closed harnesses or walls.

Parameters:

b - true = enabled (default), false = disabled

Since:
    2.5.2.0