Animation (class)

From PGE Wiki
Jump to: navigation, search

This class provides fields/functions for managing animations/effects in the current level.


Animation class
Type Function/Field Return values/Value type Description
Constructor myAnimation = Animation(int internalIndex) Animation Construct a new Animation-Object. Only use this constructor with caution. Use animations() instead!
Function Animation:mem(int offset, int fieldtype, object value) nil Sets a value of the Animation struct at a specific address-offset.
Function Animation:mem(int offset, int fieldtype) object Returns a value of the Animation struct at a specific address-offset.
Field Animation.x double The x coordinate of the animation.
Field Animation.y double The y coordinate of the animation.
Field Animation.speedX double The x-speed of the animation.
Field Animation.speedY double The y-speed of the animation.
Field Animation.id int The animation-id of the animation.
Field Animation.width int The width of the animation.
Field Animation.height int The height of the animation.
Field Animation.subTimer int The sub-timer. Some effects use it in addition to the normal timer. If modifying "Animation.timer" doesn't work you may need to modify this value too.
Field Animation.timer int The timer (frames until finished) of the animation.
Field Animation.animationFrame int The current animation frame.
Field Animation.npcID int The npcID for effects like yoshis egg.
Field Animation.drawOnlyMask boolean If true, then only the mask will be drawn.

Offsets

(Section under construction!)

Animation Memory (0x__ bytes)
Name Memory address Memory type Description
Unknown Animation+0x00 FIELD_WORD Unknown
Unknown Animation+0x02 FIELD_WORD Unknown