Lua functions list
(Difference between revisions)
Line 2: | Line 2: | ||
* [[getObject]](« objectName ») | * [[getObject]](« objectName ») | ||
− | * [[rotate]](object, {x, y, z}, angle, | + | * [[rotate]](object, {x, y, z}, angle, ''"local"'') |
− | * [[translate]](object, {x, y, z}, | + | * [[translate]](object, {x, y, z}, ''"local"'') |
* [[getPosition]](object) | * [[getPosition]](object) | ||
* [[getRotation]](object) | * [[getRotation]](object) | ||
Line 16: | Line 16: | ||
===Behavior=== | ===Behavior=== | ||
− | * [[getBehaviorVariable]](object, behaviorId, | + | * [[getBehaviorVariable]](object, behaviorId, "variableName") |
− | * [[setBehaviorVariable]](object, behaviorId, | + | * [[setBehaviorVariable]](object, behaviorId, "variableName", value) |
===Animation=== | ===Animation=== | ||
Line 29: | Line 29: | ||
* [[setGravity]]({x, y, z}) | * [[setGravity]]({x, y, z}) | ||
* [[getGravity]]() | * [[getGravity]]() | ||
− | * [[addCentralForce]](object, {x, y, z}, | + | * [[addCentralForce]](object, {x, y, z}, ''"local"'') |
− | * [[addTorque]](object, {x, y, z}, | + | * [[addTorque]](object, {x, y, z}, ''"local"'') |
* [[getLinearDamping]](object) | * [[getLinearDamping]](object) | ||
* [[setLinearDamping]](object, {x, y, z}) | * [[setLinearDamping]](object, {x, y, z}) | ||
Line 39: | Line 39: | ||
* [[clearForces]](object) | * [[clearForces]](object) | ||
* [[getNumCollisions]](object) | * [[getNumCollisions]](object) | ||
+ | * [[rayHit]](start, end, ''object'') | ||
===Inputs=== | ===Inputs=== | ||
Line 57: | Line 58: | ||
===Scene=== | ===Scene=== | ||
− | * [[changeScene]]( | + | * [[getScene]]("sceneName") |
+ | * [[changeScene]](scene) | ||
===Level=== | ===Level=== | ||
− | * [[loadLevel]]( | + | * [[loadLevel]]("levelName") |
===Light=== | ===Light=== | ||
Line 92: | Line 94: | ||
===Text=== | ===Text=== | ||
− | * [[setText]](object , | + | * [[setText]](object , "text") |
* [[getText]](object) | * [[getText]](object) | ||
* [[getTextColor]](object) | * [[getTextColor]](object) |
Revision as of 20:40, 5 August 2012
Contents |
Object
- getObject(« objectName »)
- rotate(object, {x, y, z}, angle, "local")
- translate(object, {x, y, z}, "local")
- getPosition(object)
- getRotation(object)
- getScale(object)
- setPosition(object, {x, y, z})
- setRotation(object, {x, y, z})
- setScale(object, {x, y, z})
- isVisible(object)
- activate(object)
- deactivate(object)
Behavior
- getBehaviorVariable(object, behaviorId, "variableName")
- setBehaviorVariable(object, behaviorId, "variableName", value)
Animation
- getCurrentAnimation(object)
- changeAnimation(object, animationId)
- isAnimationOver(object)
Physics
- setGravity({x, y, z})
- getGravity()
- addCentralForce(object, {x, y, z}, "local")
- addTorque(object, {x, y, z}, "local")
- getLinearDamping(object)
- setLinearDamping(object, {x, y, z})
- getAngularDamping(object)
- setAngularDamping(object, damping)
- isCollisionTest(object)
- isCollisionBetween(object1, object2)
- clearForces(object)
- getNumCollisions(object)
- rayHit(start, end, object)
Inputs
Sound
- playSound(object)
- pauseSound(object)
- stopSound(object)
- getSoundGain(object)
- setSoundGain(object, gain)
Scene
- getScene("sceneName")
- changeScene(scene)
Level
- loadLevel("levelName")
Light
- getLightColor(object)
- getLightRadius(object)
- getLightIntensity(object)
- setLightColor(object, {r, g, b})
- setLightRadius(object, radius)
- setLightIntensity(object, intensity)
Camera
- changeCurrentCamera(object)
- getCameraClearColor(object)
- getCameraFov(object)
- getCameraNear(object)
- getCameraFar(object)
- getCameraFogDistance(object)
- isCameraOrtho(object)
- isCameraFogEnabled(object)
- setCameraClearColor(object, {r, g, b})
- setCameraFov(object, fov)
- setCameraNear(object, near)
- setCameraFar(object, far)
- setCameraFogDistance(object, fogDistance)
- enableCameraOrtho(object, ortho)
- enableCameraFog(object, fog)
Text
- setText(object , "text")
- getText(object)
- getTextColor(object)
- setTextColor(object, {r, g, b, a})