Deactivate

From MaratisWiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "Deactivate an object. object = getObject("object") function onSceneUpdate() if isKeyPressed("UP") then activate(object) end if isKeyPressed("DOWN") t...")
 
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{lua-function|deactivate|object}}
 +
 
Deactivate an object.
 
Deactivate an object.
 +
 +
{{lua-function-param|object|object to operate on}}
  
 
     object = getObject("object")  
 
     object = getObject("object")  
Line 7: Line 11:
 
     end
 
     end
  
NOTE : For now deactivate only hide an object but the object still interacts with
+
[[Category:Lua scripting]]
environment, this is a bug that will be corrected in the next maratis version.
+
[[Category:Lua function]]
 +
[[Category:Object]]

Latest revision as of 01:15, 9 February 2014

deactivate(object)

Deactivate an object.

  • object : object to operate on
   object = getObject("object") 
   function onSceneUpdate()
       if isKeyPressed("UP") then activate(object) end
       if isKeyPressed("DOWN") then deactivate(object) end
   end
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox