Script Help¶
Introduction¶
Scripts are what adds interactivity to a world. Scripts are are elements on their own and are an entire different world within IMML.
Child Element¶
Scripts contain no child elements and only the contents of the script within itself.
Attributes¶
Name¶
| Type | xs:string |
| Use | required |
| Documentation | Name of the element |
Source¶
| Type | xs:string |
| Use | optional |
| Documentation | Source of the resource for this element |
Language¶
| type | xs:string |
| use | optional |
| default | Lua |
| documentation | Scripting language used by the block |
Example¶
Here is an example of what a script element looks like in IMML
1 <Script Name="MyScript" Language="Lua">
2
3 function main(obj, args)
4
5 --Do all the things here.
6
7 end
8
9 </Script>