GetScene
From MaratisWiki
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) m |
||
(4 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | Get the scene reference from the scene name | + | {{lua-function|getScene|sceneName}} |
+ | |||
+ | Get the scene reference from the scene name. | ||
+ | |||
+ | {{lua-function-param|sceneName|scene name}} | ||
scene = getScene("sceneName") | scene = getScene("sceneName") | ||
Line 15: | Line 19: | ||
[[Category:Lua scripting]] | [[Category:Lua scripting]] | ||
+ | [[Category:Lua function]] | ||
+ | [[Category:Scene]] |
Latest revision as of 23:55, 8 February 2014
getScene(sceneName)
Get the scene reference from the scene name.
-
sceneName
: scene name
scene = getScene("sceneName")
It can be used to get an object from a scene different than the current scene :
scene2 = getScene("scene2") scene2object = getObject(scene2, "object")
Or to access scene properties :
setGravity(scene2, gravity) getGravity(scene2) changeCurrentCamera(scene2, camera)