Interface IMyPistonBase
Describes piston block (PB scripting interface)
Inherited Members
Namespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common.dll
Syntax
public interface IMyPistonBase : IMyMechanicalConnectionBlock, IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity
Properties
CurrentPosition
Gets the current position of the piston head relative to the base.
Declaration
float CurrentPosition { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
HighestPosition
Gets the highest position the piston is capable of moving to.
Declaration
float HighestPosition { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
LowestPosition
Gets the lowest position the piston is capable of moving to.
Declaration
float LowestPosition { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
MaxLimit
Gets or sets the maximum position the piston can extend to. See LowestPosition and HighestPosition for the limits of this value.
Declaration
float MaxLimit { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
MaxVelocity
Gets the maximum velocity this piston is capable of moving at.
Declaration
float MaxVelocity { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
MinLimit
Gets or sets the minimum position the piston can retract to. See LowestPosition and HighestPosition for the limits of this value.
Declaration
float MinLimit { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
NormalizedPosition
Gets the current position normalized between MinLimit and MaxLimit
Declaration
float NormalizedPosition { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Status
Gets the current status.
Declaration
PistonStatus Status { get; }
Property Value
| Type | Description |
|---|---|
| PistonStatus |
Velocity
Gets or sets the velocity of the piston as it extends or retracts. This value can be between negative and positive MaxVelocity.
Declaration
float Velocity { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Methods
Extend()
Extends the piston.
Declaration
void Extend()
MoveToPosition(Single, Single)
Sets velocity and limits to move the piston to the specified extent value
Declaration
void MoveToPosition(float extent, float speed)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | extent | Desired position |
| System.Single | speed | Desired velocity magnitude |
Retract()
Retracts the piston.
Declaration
void Retract()
Reverse()
Reverses the direction of the piston.
Declaration
void Reverse()