Ground (functions)/Animation
This page documents the ScriptGround class for Lua scripting.
As a singleton class, it can be accessed from Lua with GROUND.
CharSetEmote
GROUND:CharSetEmote(chara, emoteid, cycles)
Make a character emote on the ground map.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundChar | RogueEssence.Ground.GroundChar | Character to emote |
| System.String | System.String | ID of the emote |
| System.Int32 | System.Int32 | The number of times to play the emote. |
CharSetDrawEffect
GROUND:CharSetDrawEffect(chara, effect)
Sets the ground character's draw effect to become invisible, shaking, still, etc.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundChar | RogueEssence.Ground.GroundChar | Target ground character. |
| RogueEssence.Dungeon.DrawEffect | RogueEssence.Dungeon.DrawEffect | The draw effect. |
CharEndDrawEffect
GROUND:CharEndDrawEffect(chara, effect)
Sets the ground character's draw effect to become invisible, shaking, still, etc.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundChar | RogueEssence.Ground.GroundChar | Target ground character. |
| RogueEssence.Dungeon.DrawEffect | RogueEssence.Dungeon.DrawEffect | The draw effect. |
CharGetAnimFallback
GROUND:CharGetAnimFallback(chara, anim)
Gets the fallback animation for the character.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundChar | RogueEssence.Ground.GroundChar | |
| System.String | System.String | The anim to get the fallback anim of. |
Returns
| Type | Description |
|---|---|
| System.String | The fallback animation, as a string. Blank if there is none. Will return anim if anim already exists. |
CharGetAnim
GROUND:CharGetAnim(chara)
Gets a character's current animation as a string.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundChar | RogueEssence.Ground.GroundChar |
Returns
| Type | Description |
|---|---|
| System.String |
CharGetAnimPoint
GROUND:CharGetAnimPoint(chara, actionPoint)
Gets the chosen action point of the character at this specific frame.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundChar | RogueEssence.Ground.GroundChar | |
| RogueEssence.Content.ActionPointType | RogueEssence.Content.ActionPointType | The ype of action point to retrieve the coordinates for. |
Returns
| Type | Description |
|---|---|
| RogueElements.Loc | The location of the action point in absolute coordinates on the map. |
CharSetAnim
GROUND:CharSetAnim(chara, anim, loop)
Set a character's animation.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundChar | RogueEssence.Ground.GroundChar | Character to animate |
| System.String | System.String | Name of the animation |
| System.Boolean | System.Boolean | Whether to loop the animation |
CharEndAnim
GROUND:CharEndAnim(chara)
Stops a character's current animation, reverting them to default idle.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundChar | RogueEssence.Ground.GroundChar | Character to stop animating |
CharWaitAnim
GROUND:CharWaitAnim(ent, anim)
Makes the character perform an animation and waits until it's over.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundEntity | RogueEssence.Ground.GroundEntity | Character to animate |
| System.String | System.String | Animation to play |
Returns
| Type | Description |
|---|---|
| NLua.LuaFunction |
CharSetAction
GROUND:CharSetAction(chara, action)
Set a character's action.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundChar | RogueEssence.Ground.GroundChar | Character to perfom the action |
| RogueEssence.Ground.GroundAction | RogueEssence.Ground.GroundAction | The action to perform |
CharWaitAction
GROUND:CharWaitAction(ent, action)
Makes the character perform an action and waits until it's over.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundEntity | RogueEssence.Ground.GroundEntity | Character to animate |
| RogueEssence.Ground.GroundAction | RogueEssence.Ground.GroundAction | Action to perform |
Returns
| Type | Description |
|---|---|
| NLua.LuaFunction |
ObjectSetAnim
GROUND:ObjectSetAnim(obj, frameTime, startFrame, endFrame, dir, cycles)
Sets a ground object's animation. After it finishes, it will return to the default animation.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundObject | RogueEssence.Ground.GroundObject | The object to animate |
| System.Int32 | System.Int32 | The duration of each frame of animation |
| System.Int32 | System.Int32 | The start frame of animation |
| System.Int32 | System.Int32 | The end frame of animation |
| RogueElements.Dir8 | RogueElements.Dir8 | The direction of the animation |
| System.Int32 | System.Int32 | The number of times to repeat the animation |
ObjectSetDefaultAnim
GROUND:ObjectSetDefaultAnim(obj, animName, frameTime, startFrame, endFrame, dir)
Sets a ground object's default animation.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundObject | RogueEssence.Ground.GroundObject | The object to animate |
| System.String | System.String | The name of the animation |
| System.Int32 | System.Int32 | The duration of each frame of animation |
| System.Int32 | System.Int32 | The start frame of animation |
| System.Int32 | System.Int32 | The end frame of animation |
| RogueElements.Dir8 | RogueElements.Dir8 | The direction of the animation |
ObjectWaitAnimFrame
GROUND:ObjectWaitAnimFrame(obj, frame)
Waits for the object to reach a specific frame before continuing.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Ground.GroundObject | RogueEssence.Ground.GroundObject | The object to wait on |
| System.Int32 | System.Int32 | The frame of animation to wait on. |
Returns
| Type | Description |
|---|---|
| NLua.LuaFunction |
References
https://github.com/RogueCollab/RogueEssence/blob/master/RogueEssence/Lua/ScriptGroundAnimation.cs
