Script Center
From Blue Mars Developer Guidebook
The Script Center is a place for Blue Mars developers to share code snippets and usable scripts. See Blue_Mars_Game_Programming for more on Lua API and sample Minigames.
|
Introductory Concepts
- Basic Script Example - Basic structure of a script, state transitions, and triggering
- Basic Flash HUD - Loading and displaying a UI element and listening for fscommands
- Basic Action Map usage - Loading and enabling an action map and using the OnAction callback
Usable Scripts
- Door - Example of a sliding or swinging door
- Elevator - Dynamic Object Elevator example (this entity will be included in the upcoming release)
- Free Camera - Example of a "free camera" that will allow the view to be detached from an avatar and travel freely
- Lua Boat Script - Working boat script with physics based on the ride-able turtle example How_to_create_an_animated_vehicle
- Web Link Objects - Allows use of objects as clickable web links
- Print MouseOver - On screen display of mouseover data
- MouseOver Entity - Detects mouse enter and exit over entities
- Local Time Script - On screen display of the local time
Code Snippets
- ARDebug - Sets console variables that control logging and the Lua debugger
- ARDebugMessage - Display a debug message on-screen with fadeout
- ARLoadFlash - Load and set up a Flash file in the HUD
- ARLookAtPos - Aim an entity at a position
- ARLookAtEntity - Aim an entity at another entity
- ARMousePick - Check what objects are under the mouse position
- ARMousePickEntity - Check if mouse is over an entity
- ARMousePickTerrain - Find terrain location under mouse
- ARPrintPick - Print info about what's under the mouse
- Read XML - Read from an XML file into a Lua table
