This repository was archived by the owner on Dec 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
The Running Programmable Block
Malware edited this page Jul 30, 2017
·
2 revisions
One of the more frequently asked questions for beginners, is how to get a hold of the programmable block or the grid containing the programmable block that is running the current scripts. This is quite simple. The base class of the scripts, MyGridProgram, has a special property for this called Me.
public void Main() {
// Write the name of the running programmable block into its detail area
Echo(Me.CustomName);
// Write the name of the grid containing the programmable block into its detail area
Echo(Me.CubeGrid.CustomName);
}Do you have questions, comments, suggestions for improvements? Is there something I can do better? Did I make a mistake? Please add an issue here, and prefix your issue title with Wiki. Thank you, your help will be very appreciated!