Applying Scripts to objects
(Difference between revisions)
NikiaelBell (Talk | contribs) |
Dahnielson (Talk | contribs) |
||
Line 24: | Line 24: | ||
Note: Only one script can be added to a scene at a time. to add more, use the 'dofile' function | Note: Only one script can be added to a scene at a time. to add more, use the 'dofile' function | ||
within a script, and include multiple other scripts. | within a script, and include multiple other scripts. | ||
+ | |||
+ | [[Category:Lua scripting]] |
Revision as of 19:25, 4 February 2014
- Once in Maratis editor, click on "Add Mesh"
- Select your object, then name it like want (here i kept the default)
- Now create a new text file in your project/scripts folder, name it like you want, ex : new.lua
I quickly edited the file for the example, this script will rotate the mesh on the X axis
- Click on the Scene button and locate your script :
- Done !
Note: Only one script can be added to a scene at a time. to add more, use the 'dofile' function within a script, and include multiple other scripts.