Returns the current animation for the actor.
[ACTOR].getAnimation()
Changes the animation for the actor to the specified one.
[ACTOR].setAnimation([ANIMATION]);
Returns true
if the actor's current animation is still playing. This is only relevant for non-looping animations since looping ones will always return true
.
[ACTOR].isAnimationPlaying()
Sets the frame (by index) for the actor's current animation.
[ACTOR].setCurrentFrame([INT]);
Returns the index of the current frame in the actor's current animation.
[ACTOR].getCurrentFrame()
Returns the number of frames in the actor's current animation.
[ACTOR].getNumFrames()
Returns the duration (in milliseconds) of the current frame in the actor's current animation.
[ACTOR].currAnimation.getFrameDurations()[[INT]]
Sets the duration (in milliseconds) of the current frame in the actor's current animation.
[ACTOR].currAnimation.setFrameDuration([INT], [INT]);
Returns the ID of the layer that this actor is part of.
[ACTOR].getLayerID()
Returns the name of the layer that this actor is part of.
[ACTOR].getLayerName()
Changes an actor's layer by either specifying the Layer ID or Layer Name. You can find both pieces of info in the Scene Designer's Layers Pane.
[ACTOR].moveToLayer(engine.getLayerById([INT]));
[ACTOR].moveToLayer(engine.getLayerByName([TEXT]));
A user-friendly way of making adjustments to an actor's layer. Can move to front/back/forward 1 layer/back 1 layer.
[ACTOR].sendBackward();
[ACTOR].bringForward();
[ACTOR].sendToBack();
[ACTOR].bringToFront();
A user-friendly way of making adjustments to an actor's drawing order (z-order) within a layer. Can move to front/back/forward 1 layer/back 1 layer.
[ACTOR].moveDown();
[ACTOR].moveUp();
[ACTOR].moveToBottom();
[ACTOR].moveToTop();
Returns an actor's drawing order (z-order) within its layer.
[ACTOR].getZIndex()
Sets an actor's drawing order (z-order) within its layer. This lets you make fine-tuned adjustments to layering without introducing a more layers to the game.
[ACTOR].setZIndex([INT]);
Returns the number of actors in the specified actor's layer. Can specify by Layer ID or Layer Name. You can find both pieces of info in the Scene Designer's Layers Pane.
engine.getNumberOfActorsWithinLayer(engine.getLayerById([INT]))
engine.getNumberOfActorsWithinLayer(engine.getLayerByName([TEXT]))
Makes the actor invisible or visible. Everything else about the actor still works, and the [actor] is on screen
block will still return true
.
[ACTOR].enableActorDrawing();
[ACTOR].disableActorDrawing();
Sets the actor's opacity (alpha) value, which controls how "transparent" the actor is. Value must be between [0 - 100] inclusive. 0 means fully transparent. 100 is the default.
[ACTOR].alpha = [NUMBER] / 100;
Returns the actor's opacity (alpha) value as a value between [0 - 100] inclusive.
([ACTOR].alpha * 100)
Moves the actor to the HUD layer, which is on top of all regular layers. The actor will ignore the camera, so when the screen scrolls, the actor will still remain in the same place.
[ACTOR].anchorToScreen();
Moves the actor back from the HUD layer.
[ACTOR].unanchorFromScreen();