Difference between revisions of "Develop:LavishScript"
Line 55: | Line 55: | ||
== Tutorials and Guides == | == Tutorials and Guides == | ||
− | + | * [[Develop:LavishScript:Getting Started|Getting Started with LavishScript]] | |
+ | |||
+ | More coming soon... :) | ||
== LavishScript References == | == LavishScript References == |
Latest revision as of 16:00, 17 August 2019
Overview
LavishScript is the scripting engine built into Inner Space, and is used for in-client features during gameplay. If you have any previous experience with programming, this page should help you get started with the LavishScript required for ISBoxer 2 Module development.
LavishScript is primarily based on a command parser (i.e. those that might be entered into a command prompt), with in-place text replacement of "data sequences".
- In the following example, the Echo command is used to print "Hello World!" to a LavishScript console.
function main() { echo "Hello World!" }
LavishScript also includes object-oriented (OO) features. ISBoxer 2 Modules are created using LavishScript object definitions (objectdefs).
- In the following example, a LavishScript object is defined, with a constructor and destructor (Initialize and Shutdown methods), and a template for handling a Task
/* Module: My First Module Version: 0.1 This file controls and defines behaviors for the Module! For use in-client. */ objectdef isb2_MFM_controller inherits isboxer2module_controller { method Initialize() { ; Construct } method Shutdown() { ; Destruct } method Task_Test() { switch ${Context.TaskState} { case Start echo ${Context(type)} ${Context.Timestamp} ${Context.ElapsedMS} ${Context.Task} ${Context.TaskState} instant=${Context.Task.IsInstant} ${Context.Task.Args} break case Continue ; echo ${Context(type)} ${Context.Timestamp} ${Context.ElapsedMS} ${Context.Task} ${Context.TaskState} instant=${Context.Task.IsInstant} ${Context.Task.Args} break case Stop echo ${Context(type)} ${Context.Timestamp} ${Context.ElapsedMS} ${Context.Task} ${Context.TaskState} instant=${Context.Task.IsInstant} ${Context.Task.Args} break } } }
The above example also contains examples of Data Sequences, such as ${Context.TaskState}. This particular sequence obtains the value of TaskState from an object called Context, placing the result in-place within the command line.
Tutorials and Guides
More coming soon... :)
LavishScript References
ISBoxer 2 Module Development