SetText

(Difference between revisions)
Jump to: navigation, search
(Created page with "Displaying text. Can be used to display any kind of info : Objects collisions & coordinates, timers, messages, well anything you want. Example 1 : Simple timer display. Make ...")
 
Line 11: Line 11:
 
         setText(Text0, text0)
 
         setText(Text0, text0)
 
     end
 
     end
 +
 +
[[Category:Lua scripting]]

Revision as of 19:13, 4 February 2014

Displaying text. Can be used to display any kind of info : Objects collisions & coordinates, timers, messages, well anything you want.

Example 1 : Simple timer display. Make sure you added a Text item in the maratis editor

   Text0 = getObject("Text0")
   t = 0
   function onSceneUpdate()
       t = t + 1
       text0 = "Time = " .. t -- change the last "t" to display another info
       setText(Text0, text0)
   end
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox