Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Sandbox.ModAPI.Ingame.MyGridProgram

Malware edited this page Feb 28, 2019 · 52 revisions

IndexNamespace Index

MyGridProgram Class

public abstract class MyGridProgram: IMyGridProgram

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.

Namespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common.dll

Implements:

Example

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.");  
}  
  

Properties

Member Description
GridTerminalSystem Provides access to the grid terminal system as viewed from this programmable block.
Me Gets a reference to the currently running programmable block.
ElapsedTime Obsolete: Use Runtime.TimeSinceLastRun instead

Gets the amount of in-game time elapsed from the previous run.
Runtime Gets runtime information for the running grid program.
Storage Allows you to store data between game sessions.
Echo Prints out text onto the currently running programmable block's detail info area.
IGC
Clone this wiki locally