Applying Scripts to objects

From MaratisWiki
(Difference between revisions)
Jump to: navigation, search
m
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
* Once in Maratis editor, click on "Add Mesh"
+
Once in Maratis editor, click on "Add Mesh"
 +
 
 
https://dl.dropbox.com/u/19970067/MWiki/ApplyingScript/addmesh.png
 
https://dl.dropbox.com/u/19970067/MWiki/ApplyingScript/addmesh.png
  
 +
Select your object, then name it like want (here i kept the default)
  
* Select your object, then name it like want (here i kept the default)
 
 
https://dl.dropbox.com/u/19970067/MWiki/ApplyingScript/rename.png
 
https://dl.dropbox.com/u/19970067/MWiki/ApplyingScript/rename.png
  
 
+
Now create a new text file in your project/scripts folder, name it like you want, e.g.: new.lua
* 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''
+
  
 
https://dl.dropbox.com/u/19970067/MWiki/ApplyingScript/script.png
 
https://dl.dropbox.com/u/19970067/MWiki/ApplyingScript/script.png
  
 +
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:
  
* Click on the Scene button and locate your script :
 
 
https://dl.dropbox.com/u/19970067/MWiki/ApplyingScript/scene.png
 
https://dl.dropbox.com/u/19970067/MWiki/ApplyingScript/scene.png
  
Line 20: Line 21:
 
https://dl.dropbox.com/u/19970067/MWiki/ApplyingScript/scriptok.png
 
https://dl.dropbox.com/u/19970067/MWiki/ApplyingScript/scriptok.png
  
 +
Done!
  
* 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.
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.
+
  
 +
[[Category:User manual]]
 
[[Category:Lua scripting]]
 
[[Category:Lua scripting]]

Latest revision as of 09:24, 10 February 2014

Once in Maratis editor, click on "Add Mesh"

addmesh.png

Select your object, then name it like want (here i kept the default)

rename.png

Now create a new text file in your project/scripts folder, name it like you want, e.g.: new.lua

script.png

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:

scene.png

scriptselect.png

scriptok.png

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.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox