Click or drag to resize
MyGridProgram Class
v01.180.0 (Beta)

[This is preliminary documentation and is subject to change.]

All programmable block scripts derive from this class, meaning that all properties in this class are directly available for use in your scripts. If you use Visual Studio or other external editors to write your scripts, you can derive directly from this class and have a compatible script template.
Inheritance Hierarchy
SystemObject
  Sandbox.ModAPI.IngameMyGridProgram

Namespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common (in Sandbox.Common.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public abstract class MyGridProgram : IMyGridProgram

The MyGridProgram type exposes the following members.

Constructors
  NameDescription
Protected methodMyGridProgram
Initializes a new instance of the MyGridProgram class
Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
Properties
  NameDescription
Public propertyEcho
Prints out text onto the currently running programmable block's detail info area.
Public propertyElapsedTime Obsolete.
Gets the amount of in-game time elapsed from the previous run.
Public propertyGridTerminalSystem
Provides access to the grid terminal system as viewed from this programmable block.
Public propertyMe
Gets a reference to the currently running programmable block.
Public propertyRuntime
Gets runtime information for the running grid program.
Public propertyStorage
Allows you to store data between game sessions.
Top
Examples
public void Main()
{
    // Print out the time elapsed since the currently running programmable block was run
    // the last time.
    Echo(Me.CustomName + " was last run " + Runtime.TimeSinceLastRun.TotalSeconds + " seconds ago.");
}
See Also