Lua functions list
(Difference between revisions)
Line 1: | Line 1: | ||
− | + | ===Object=== | |
− | getObject(« objectName ») | + | * [[getObject]](« objectName ») |
− | rotate(object, {x, y, z}, angle, « local ») | + | * [[rotate]](object, {x, y, z}, angle, « local ») |
− | translate(object, {x, y, z}, « local ») | + | * [[translate]](object, {x, y, z}, « local ») |
− | getPosition(object) | + | * [[getPosition]](object) |
− | getRotation(object) | + | * [[getRotation]](object) |
− | getScale(object) | + | * [[getScale]](object) |
− | setPosition(object, {x, y, z}) | + | * [[setPosition]](object, {x, y, z}) |
− | setRotation(object, {x, y, z}) | + | * [[setRotation]](object, {x, y, z}) |
− | setScale(object, {x, y, z}) | + | * [[setScale]](object, {x, y, z}) |
− | isVisible(object) | + | * [[isVisible]](object) |
− | activate(object) | + | * [[activate]](object) |
− | deactivate(object) | + | * [[deactivate]](object) |
− | + | ===Behavior=== | |
− | getBehaviorVariable(object, behaviorId, « variableName ») | + | * [[getBehaviorVariable]](object, behaviorId, « variableName ») |
− | setBehaviorVariable(object, behaviorId, « variableName », value) | + | * [[setBehaviorVariable]](object, behaviorId, « variableName », value) |
− | + | ===Animation=== | |
− | getCurrentAnimation(object) | + | * [[getCurrentAnimation]](object) |
− | changeAnimation(object, animationId) | + | * [[changeAnimation]](object, animationId) |
− | isAnimationOver(object) | + | * [[isAnimationOver]](object) |
− | + | ===Physics=== | |
− | setGravity({x, y, z}) | + | * [[setGravity]]({x, y, z}) |
− | getGravity() | + | * [[getGravity]]() |
− | addCentralForce(object, {x, y, z}, « local ») | + | * [[addCentralForce]](object, {x, y, z}, « local ») |
− | addTorque(object, {x, y, z}, « local ») | + | * [[addTorque]](object, {x, y, z}, « local ») |
− | getLinearDamping(object) | + | * [[getLinearDamping]](object) |
− | setLinearDamping(object, {x, y, z}) | + | * [[setLinearDamping]](object, {x, y, z}) |
− | getAngularDamping(object) | + | * [[getAngularDamping]](object) |
− | setAngularDamping(object, damping) | + | * [[setAngularDamping]](object, damping) |
− | isCollisionTest(object) | + | * [[isCollisionTest]](object) |
− | isCollisionBetween(object1, object2) | + | * [[isCollisionBetween]](object1, object2) |
− | clearForces(object) | + | * [[clearForces]](object) |
− | getNumCollisions(object) | + | * [[getNumCollisions]](object) |
− | + | ===Inputs=== | |
− | isKeyPressed([[Keys|key]]) | + | * [[isKeyPressed]]([[Keys|key]]) |
− | onKeyDown([[Keys|key]]) | + | * [[onKeyDown]]([[Keys|key]]) |
− | onKeyUp([[Keys|key]]) | + | * [[onKeyUp]]([[Keys|key]]) |
− | getAxis([[Axis|axis]]) | + | * [[getAxis]]([[Axis|axis]]) |
− | + | ===Sound=== | |
− | playSound(object) | + | * [[playSound]](object) |
− | pauseSound(object) | + | * [[pauseSound]](object) |
− | stopSound(object) | + | * [[stopSound]](object) |
− | getSoundGain(object) | + | * [[getSoundGain]](object) |
− | setSoundGain(object, gain) | + | * [[setSoundGain]](object, gain) |
− | + | ===Scene=== | |
− | changeScene(sceneId) | + | * [[changeScene]](sceneId) |
− | + | ===Level=== | |
− | loadLevel(« levelName ») | + | * [[loadLevel]](« levelName ») |
− | + | ===Light=== | |
− | getLightColor(object) | + | * [[getLightColor]](object) |
− | getLightRadius(object) | + | * [[getLightRadius]](object) |
− | getLightIntensity(object) | + | * [[getLightIntensity]](object) |
− | setLightColor(object, {r, g, b}) | + | * [[setLightColor]](object, {r, g, b}) |
− | setLightRadius(object, radius) | + | * [[setLightRadius]](object, radius) |
− | setLightIntensity(object, intensity) | + | * [[setLightIntensity]](object, intensity) |
− | + | ===Camera=== | |
− | changeCurrentCamera(object) | + | * [[changeCurrentCamera]](object) |
− | getCameraClearColor(object) | + | * [[getCameraClearColor]](object) |
− | getCameraFov(object) | + | * [[getCameraFov]](object) |
− | getCameraNear(object) | + | * [[getCameraNear]](object) |
− | getCameraFar(object) | + | * [[getCameraFar]](object) |
− | getCameraFogDistance(object) | + | * [[getCameraFogDistance]](object) |
− | isCameraOrtho(object) | + | * [[isCameraOrtho]](object) |
− | isCameraFogEnabled(object) | + | * [[isCameraFogEnabled]](object) |
− | setCameraClearColor(object, {r, g, b}) | + | * [[setCameraClearColor]](object, {r, g, b}) |
− | setCameraFov(object, fov) | + | * [[setCameraFov]](object, fov) |
− | setCameraNear(object, near) | + | * [[setCameraNear]](object, near) |
− | setCameraFar(object, far) | + | * [[setCameraFar]](object, far) |
− | setCameraFogDistance(object, fogDistance) | + | * [[setCameraFogDistance]](object, fogDistance) |
− | enableCameraOrtho(object, ortho) | + | * [[enableCameraOrtho]](object, ortho) |
− | enableCameraFog(object, fog) | + | * [[enableCameraFog]](object, fog) |
− | + | ===Text=== | |
− | setText(object , « text ») | + | * [[setText]](object , « text ») |
− | getText(object) | + | * [[getText]](object) |
− | getTextColor(object) | + | * [[getTextColor]](object) |
− | setTextColor(object, {r, g, b, a}) | + | * [[setTextColor]](object, {r, g, b, a}) |
− | + | ===Cursor=== | |
− | centerCursor() | + | * [[centerCursor]]() |
Revision as of 19:58, 9 April 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)
Inputs
Sound
- playSound(object)
- pauseSound(object)
- stopSound(object)
- getSoundGain(object)
- setSoundGain(object, gain)
Scene
- changeScene(sceneId)
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})