Method Summary |
|
bool |
canStationManualCloseGates() This method can be called for a station section to check if the gates can be closed. |
bool |
canStationManualCloseHarness() This method can be called for a station section to check if the harnesses can be closed. |
bool |
canStationManualDisengagePlatform() This method can be called for a station section to check if the plaform can be disengaged. |
bool |
canStationManualDispatch() This method can be called to check if a manual train dispatch is possible. |
bool |
canStationManualEngagePlatform() This method can be called for a station section to check if the plaform can be engaged. |
bool |
canStationManualLockSeats() This method can be called for a station section to check if seats can be locked. |
bool |
canStationManualOpenGates() This method can be called for a station section to check if the gates can be opened. |
bool |
canStationManualOpenHarness() This method can be called for a station section to check if the harnesses can be opened. |
bool |
canStationManualUnlockSeats() This method can be called for a station section to check if seats can be unlocked. |
bool |
doStationManualCloseGates() This method can be called for a station section to close the gates. |
bool |
doStationManualCloseHarness() This method can be called for a station section to close the harnesses. |
bool |
doStationManualDisengagePlatform() This method can be called for a station section to disengage the platform. |
bool |
doStationManualDispatch() This method can be called to do a manual train dispatch. |
bool |
doStationManualEngagePlatform() This method can be called for a station section to engage the platform. |
bool |
doStationManualLockSeats() This method can be called for a station section to lock the seats. |
bool |
doStationManualOpenGates() This method can be called for a station section to open the gates. |
bool |
doStationManualOpenHarness() This method can be called for a station section to open the harnesses. |
bool |
doStationManualUnlockSeats() This method can be called for a station section to unlock the seats. |
double |
getBrakeWaitTime() Will return the brake's complete stop wait-time in seconds, as specified in the brake settings. |
Coaster |
getCoaster() Returns the coaster this block belongs to |
double |
getLiftCurrentSpeed() Get the current speed of the lift device. |
String |
getName() Returns the name of the section, as specified in the editor. |
float |
getStationGateState() Returns the state of the station's gates (0...1), where 0 means fully closed, 1 means fully opened. |
float |
getStationPlatformState() Returns the state of the station's platform (0...1), where 0 means fully lowered, 1 means fully raised. |
Train |
getTrainOnSection() Returns the train that is on the section, or null if there is no train. |
double |
getTransportCurrentSpeed() Get the current speed of the transport device. |
bool |
iStation() Same as isStation. Use isStation instead. This was the original method that contained a typo. It is kept for backwards compatibility only. |
bool |
isBrakeCompleteStop() Will return true if the complete stop option was enabled in the brake settings. |
bool |
isBrakesOn() Get the state of the brake device. |
bool |
isLift() Returns true if this section is a lift. |
bool |
isStation() Returns true if this section is a station. |
bool |
isStationManualClosedGates() This method can be called for a station section to check the status of the gates |
bool |
isStationManualClosedHarness() This method can be called for a station section to check the status of the harnesses. |
bool |
isStationManualDisengagedPlatform() This method can be called for a station section to check the status of the moving platform |
bool |
isStationManualDispatchMode() Checks if this section is a station section and if it is set to manual dispatch mode. |
bool |
isStationManualEngagedPlatform() This method can be called for a station section to check the status of the moving platform |
bool |
isStationManualLockedSeats() This method can be called for a station section to check the status of the seats |
bool |
isStationManualOpenedGates() This method can be called for a station section to check the status of the gates |
bool |
isStationManualOpenedHarness() This method can be called for a station section to check the status of the harnesses. |
bool |
isStationManualUnlockedSeats() This method can be called for a station section to check the status of the seats |
bool |
isStationWaitingForAdvance() Returns true if this section is a station and requests for train leaving. |
bool |
isStationWaitingForClearBlock() Returns true if this section is a station and requests to check for clearance of the next block. |
bool |
isTrainBeforeBrakeTrigger() Can be used to detect if a train is before the brake trigger of a brake section. |
bool |
isTrainBeforeCenterOfSection() Can be used to detect if a train is before the center of a section |
bool |
isTrainBeforeLiftTrigger() Can be used to detect if a train is before the lift trigger of a lift section. |
bool |
isTrainBeforeStartOfSection(double distFromStart) Can be used to detect if a train is near the start of a section. |
bool |
isTrainBehindBrakeTrigger() Can be used to detect if a train is behind the brake trigger of a brake section. |
bool |
isTrainBehindCenterOfSection() Can be used to detect if a train is behind the center of a section |
bool |
isTrainBehindEndOfSection(double distFromEnd) Can be used to detect if a train is near the end of a section. |
bool |
isTrainBehindLiftTrigger() Can be used to detect if a train is behind the lift trigger of a lift section. |
bool |
isTrainOnSection() Checks if there is a train on the section. |
void |
setBrakesOff() Turns the brakes off. |
void |
setBrakesOn() Turns the brakes permanently on. |
void |
setBrakesTrim() Sets the brakes into trim mode. The brakes will be automatically turned on and off depending on the train's speed, if there is one on the section. |
void |
setLiftBwdOn() Turns the lift on backwards. |
void |
setLiftFwdIdleOn() Turns the lift on forwards in idle mode (slow). |
void |
setLiftFwdOn() Turns the lift on forwards. |
void |
setLiftOff() Turns the lift off. |
void |
setStationEntering() This will start the internal station handler. The internal station handler will now take care of the train. |
void |
setStationLeaving() This will end the internal station handler. The script is now responsible for moving the train out of the station. |
void |
setStationManualDispatchMode(bool manualOn) Sets the dispatch mode of this station, if this section is station. If this section is no station, the call to this method is ignored. |
void |
setStationNextBlockClear() Informs the station, that the next block is clear. |
void |
setStationNextBlockOccupied() Informs the station, that the next block is not clear. |
void |
setTransportsLaunchBwdOn() Turns the transports on backwards, using the launch speed as specified in the transport settings. |
void |
setTransportsLaunchFwdOn() Turns the transports on forwards, using the launch speed as specified in the transport settings. |
void |
setTransportsOff() Turns the transports off. |
void |
setTransportsStandardBwdDependingOnBrake() Turns the transports backwards on or off automatically, depending on the state of the brakes. Works best when brakes are in trim mode. |
void |
setTransportsStandardBwdOn() Turns the transports on backwards, using the standard speed as specified in the transport settings. |
void |
setTransportsStandardFwdDependingOnBrake() Turns the transports forwards on or off automatically, depending on the state of the brakes. Works best when brakes are in trim mode. |
void |
setTransportsStandardFwdOn() Turns the transports on forwards, using the standard speed as specified in the transport settings. |
Method Detail |
public final bool canStationManualCloseGates()
This method can be called for a station section to check if the gates can be closed.
Returns:
true when the section is a station and it is in manual dispatch mode, and if the gates can be closed.
Since:
2.6.4.0
public final bool canStationManualCloseHarness()
This method can be called for a station section to check if the harnesses can be closed.
Returns:
true when the section is a station and it is in manual dispatch mode, and if the harnesses can be closed.
Since:
2.6.4.0
public final bool canStationManualDisengagePlatform()
This method can be called for a station section to check if the plaform can be disengaged.
Returns:
true when the section is a station and it is in manual dispatch mode, and if the station has a moving platform, and if the platform can be disengaged.
Since:
2.6.4.0
public final bool canStationManualDispatch()
This method can be called to check if a manual train dispatch is possible.
Returns:
true when this section is a station, and it is in manual dispatch mode, and if a train is ready to get dispatched.
Since:
2.6.4.0
public final bool canStationManualEngagePlatform()
This method can be called for a station section to check if the plaform can be engaged.
Returns:
true when the section is a station and it is in manual dispatch mode, and if the station has a moving platform, and if the platform can be engaged.
Since:
2.6.4.0
public final bool canStationManualLockSeats()
This method can be called for a station section to check if seats can be locked.
Returns:
true when the section is a station and it is in manual dispatch mode, and if the train has lockable seats, and if the seats can be locked.
Since:
2.6.4.0
public final bool canStationManualOpenGates()
This method can be called for a station section to check if the gates can be opened.
Returns:
true when the section is a station and it is in manual dispatch mode, and if the gates can be opened.
Since:
2.6.4.0
public final bool canStationManualOpenHarness()
This method can be called for a station section to check if the harnesses can be opened.
Returns:
true when the section is a station and it is in manual dispatch mode, and if the harnesses can be opened.
Since:
2.6.4.0
public final bool canStationManualUnlockSeats()
This method can be called for a station section to check if seats can be unlocked.
Returns:
true when the section is a station and it is in manual dispatch mode, and if the train has lockable seats, and if the seats can be unlocked.
Since:
2.6.4.0
public final bool doStationManualCloseGates()
This method can be called for a station section to close the gates.
Works only if section is a station and it is in manual dispatch mode, and if gates can be closed.
Returns:
true when the gates could be closed
Since:
2.6.4.0
public final bool doStationManualCloseHarness()
This method can be called for a station section to close the harnesses.
Works only if section is a station and it is in manual dispatch mode, and if harnesses can be closed.
Returns:
true when the harnesses could be closed
Since:
2.6.4.0
public final bool doStationManualDisengagePlatform()
This method can be called for a station section to disengage the platform.
Works only if section is a station and it is in manual dispatch mode, and if the station has a moving platform, and if the platform can be disengaged.
Returns:
true when the platform could be disenganged
Since:
2.6.4.0
public final bool doStationManualDispatch()
This method can be called to do a manual train dispatch.
The call is ignored if no dispatch was possible (see canStationManualDispatch).
Returns:
true when a dispatch was mode, false if no dispatch was possible.
Since:
2.6.4.0
public final bool doStationManualEngagePlatform()
This method can be called for a station section to engage the platform.
Works only if section is a station and it is in manual dispatch mode, and if the station has a moving platform, and if the platform can be engaged.
Returns:
true when the platform could be enganged
Since:
2.6.4.0
public final bool doStationManualLockSeats()
This method can be called for a station section to lock the seats.
Works only if section is a station and it is in manual dispatch mode, and if the train has lockable seats, and if the seats can be locked.
Returns:
true when the seats could be locked
Since:
2.6.4.0
public final bool doStationManualOpenGates()
This method can be called for a station section to open the gates.
Works only if section is a station and it is in manual dispatch mode, and if gates can be opened.
Returns:
true when the gates could be opened
Since:
2.6.4.0
public final bool doStationManualOpenHarness()
This method can be called for a station section to open the harnesses.
Works only if section is a station and it is in manual dispatch mode, and if harnesses can be opened.
Returns:
true when the harnesses could be opened
Since:
2.6.4.0
public final bool doStationManualUnlockSeats()
This method can be called for a station section to unlock the seats.
Works only if section is a station and it is in manual dispatch mode, and if the train has lockable seats, and if the seats can be unlocked.
Returns:
true when the seats could be unlocked
Since:
2.6.4.0
public final double getBrakeWaitTime()
Will return the brake's complete stop wait-time in seconds, as specified in the brake settings.
public final Coaster getCoaster()
Returns the coaster this block belongs to
Returns:
coaster this block belongs to
Since:
2.5.7.0
public final double getLiftCurrentSpeed()
Get the current speed of the lift device.
Returns:
lift speed in meters per second.
Since:
2.5.5.0
public final String getName()
Returns the name of the section, as specified in the editor.
Returns:
name of section as specified in the editor
public final float getStationGateState()
Returns the state of the station's gates (0...1), where 0 means fully closed, 1 means fully opened.
Returns only usefull values for station sections that have gates.
Returns:
station gate state
Since:
2.5.1.0
public final float getStationPlatformState()
Returns the state of the station's platform (0...1), where 0 means fully lowered, 1 means fully raised.
Returns only usefull values for station sections that have platforms.
Returns:
station platform state
Since:
2.5.2.0
public final Train getTrainOnSection()
Returns the train that is on the section, or null if there is no train.
If there are more than one train on the section, the dominating train which occupies the longest distance will be returned.
Returns:
handle to a train, or null if there is no train
public final double getTransportCurrentSpeed()
Get the current speed of the transport device.
Returns:
transport speed in meters per second.
Since:
2.5.5.0
public final bool iStation()
Same as isStation. Use isStation instead. This was the original method that contained a typo. It is kept for backwards compatibility only.
public final bool isBrakeCompleteStop()
Will return true if the complete stop option was enabled in the brake settings.
public final bool isBrakesOn()
Get the state of the brake device.
Returns if brakes are on (true) or off (false) Returns false if has no brakes.
Returns:
brake state
Since:
2.5.5.0
public final bool isLift()
Returns true if this section is a lift.
Returns:
true when section is a lift section, otherwise it will return false
Since:
2.5.7.0
public final bool isStation()
Returns true if this section is a station.
Stations have a built-in station handler which will take care of a train when the handler is in charge. Use the isStation... and setStation methods to communicate with the station handler.
public final bool isStationManualClosedGates()
This method can be called for a station section to check the status of the gates
Works only if section is a station and it is in manual dispatch mode
Returns:
true when the gates are closed.
Since:
2.6.4.0
public final bool isStationManualClosedHarness()
This method can be called for a station section to check the status of the harnesses.
Works only if section is a station and it is in manual dispatch mode, and if there is a train in the station.
Returns:
true when the harnesses are closed.
Since:
2.6.4.0
public final bool isStationManualDisengagedPlatform()
This method can be called for a station section to check the status of the moving platform
Works only if section is a station and it is in manual dispatch mode, and if the station has a moving platform.
Returns:
true when the platform is disengaged.
Since:
2.6.4.0
public final bool isStationManualDispatchMode()
Checks if this section is a station section and if it is set to manual dispatch mode.
Returns:
true if this section is a station, and if it is set to manual dispatch mode
Since:
2.6.4.0
public final bool isStationManualEngagedPlatform()
This method can be called for a station section to check the status of the moving platform
Works only if section is a station and it is in manual dispatch mode, and if the station has a moving platform.
Returns:
true when the platform is engaged.
Since:
2.6.4.0
public final bool isStationManualLockedSeats()
This method can be called for a station section to check the status of the seats
Works only if section is a station and it is in manual dispatch mode, and if the there is a train inside the station, and if the train has lockable seats.
Returns:
true when the seats are locked.
Since:
2.6.4.0
public final bool isStationManualOpenedGates()
This method can be called for a station section to check the status of the gates
Works only if section is a station and it is in manual dispatch mode
Returns:
true when the gates are opened.
Since:
2.6.4.0
public final bool isStationManualOpenedHarness()
This method can be called for a station section to check the status of the harnesses.
Works only if section is a station and it is in manual dispatch mode, and if there is a train in the station.
Returns:
true when the harnesses are opened
Since:
2.6.4.0
public final bool isStationManualUnlockedSeats()
This method can be called for a station section to check the status of the seats
Works only if section is a station and it is in manual dispatch mode, and if the there is a train inside the station, and if the train has lockable seats.
Returns:
true when the seats are unlocked.
Since:
2.6.4.0
public final bool isStationWaitingForAdvance()
Returns true if this section is a station and requests for train leaving.
To answer this, use either setStationLeaving() or setStationNextBlockOccupied().
public final bool isStationWaitingForClearBlock()
Returns true if this section is a station and requests to check for clearance of the next block.
To answer this, use either setStationNextBlockClear() or setStationNextBlockOccupied().
public final bool isTrainBeforeBrakeTrigger()
Can be used to detect if a train is before the brake trigger of a brake section.
Will always return false if the section is no brake section.
public final bool isTrainBeforeCenterOfSection()
Can be used to detect if a train is before the center of a section
public final bool isTrainBeforeLiftTrigger()
Can be used to detect if a train is before the lift trigger of a lift section.
Will always return false if the section is no lift section.
public final bool isTrainBeforeStartOfSection(double distFromStart)
Can be used to detect if a train is near the start of a section.
Checks if the position x of the back of the train on the section is <= the specified position y = distFromStart. Will always return false if there is no train on the section.
public final bool isTrainBehindBrakeTrigger()
Can be used to detect if a train is behind the brake trigger of a brake section.
Will always return false if the section is no brake section.
public final bool isTrainBehindCenterOfSection()
Can be used to detect if a train is behind the center of a section
public final bool isTrainBehindEndOfSection(double distFromEnd)
Can be used to detect if a train is near the end of a section.
Checks if the position x of the front of the train on the section is >= the specified position y = length of section - distFromEnd. Will always return false if there is no train on the section.
public final bool isTrainBehindLiftTrigger()
Can be used to detect if a train is behind the lift trigger of a lift section.
Will always return false if the section is no lift section.
public final bool isTrainOnSection()
Checks if there is a train on the section.
Returns:
true when there is a train on this section
public final void setBrakesOff()
Turns the brakes off.
Has no effect if the section has no brakes. The coaster needs to be in scripted operation mode.
public final void setBrakesOn()
Turns the brakes permanently on.
Has no effect if the section has no brakes. The coaster needs to be in scripted operation mode.
public final void setBrakesTrim()
Sets the brakes into trim mode. The brakes will be automatically turned on and off depending on the train's speed, if there is one on the section.
Has no effect if the section has no brakes. The coaster needs to be in scripted operation mode.
public final void setLiftBwdOn()
Turns the lift on backwards.
Has no effect if the section is no lift section. The coaster needs to be in scripted operation mode.
public final void setLiftFwdIdleOn()
Turns the lift on forwards in idle mode (slow).
Has no effect if the section is no lift section. The coaster needs to be in scripted operation mode. Only chains may support idle mode, other devices such as wheels or LIMs will switch off instead.
Since:
2.5.5.0
public final void setLiftFwdOn()
Turns the lift on forwards.
Has no effect if the section is no lift section. The coaster needs to be in scripted operation mode.
public final void setLiftOff()
Turns the lift off.
Has no effect if the section is no lift section. The coaster needs to be in scripted operation mode.
public final void setStationEntering()
This will start the internal station handler. The internal station handler will now take care of the train.
This is typically a response to checking if a train has entered a station section. After the use of setStationEntering(), the script should check the station handler state with isStationWaitingForClearBlock() and isStationWaitingForAdvance(). The coaster needs to be in scripted operation mode.
public final void setStationLeaving()
This will end the internal station handler. The script is now responsible for moving the train out of the station.
This is typically a response to checking with isStationWaitingForAdvance(). The coaster needs to be in scripted operation mode.
public final void setStationManualDispatchMode(bool manualOn)
Sets the dispatch mode of this station, if this section is station. If this section is no station, the call to this method is ignored.
Parameters:
manualOn | - | true for manual dispatch mode, false for automatic dispatch mode |
Since:
2.6.4.0
public final void setStationNextBlockClear()
Informs the station, that the next block is clear.
This is typically a response to checking with isStationWaitingForClearBlock(). The coaster needs to be in scripted operation mode.
public final void setStationNextBlockOccupied()
Informs the station, that the next block is not clear.
This is typically a response to checking with isStationWaitingForClearBlock() or isStationWaitingForAdvance(). The coaster needs to be in scripted operation mode.
public final void setTransportsLaunchBwdOn()
Turns the transports on backwards, using the launch speed as specified in the transport settings.
Has no effect if the section has no transport device or if launch is not activated. The coaster needs to be in scripted operation mode.
public final void setTransportsLaunchFwdOn()
Turns the transports on forwards, using the launch speed as specified in the transport settings.
Has no effect if the section has no transport device or if launch is not activated. The coaster needs to be in scripted operation mode.
public final void setTransportsOff()
Turns the transports off.
Has no effect if the section has no transport device. For lifts, use the setLift methods instead. The coaster needs to be in scripted operation mode.
public final void setTransportsStandardBwdDependingOnBrake()
Turns the transports backwards on or off automatically, depending on the state of the brakes. Works best when brakes are in trim mode.
Has no effect if the section has no transport device or has no brake device. The coaster needs to be in scripted operation mode.
public final void setTransportsStandardBwdOn()
Turns the transports on backwards, using the standard speed as specified in the transport settings.
Has no effect if the section has no transport device. For lifts, use the setLift methods instead. The coaster needs to be in scripted operation mode.
public final void setTransportsStandardFwdDependingOnBrake()
Turns the transports forwards on or off automatically, depending on the state of the brakes. Works best when brakes are in trim mode.
Has no effect if the section has no transport device or has no brake device. The coaster needs to be in scripted operation mode.
public final void setTransportsStandardFwdOn()
Turns the transports on forwards, using the standard speed as specified in the transport settings.
Has no effect if the section has no transport device. For lifts, use the setLift methods instead. The coaster needs to be in scripted operation mode.