Ground (functions)
The ground functions are used for various tasks on ground maps.
Hide
Hides an entity. Argument order is GROUND:Hide(entityName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| entityName | String | System.String
|
The name of the entity to hide. |
Unhide
Unhides an entity. Argument order is GROUND:Unhide(entityName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| entityName | String | System.String
|
The name of the entity to unhide. |
CreateObject
TODO: WIP. Argument order is GROUND:CreateObject(objType, instName, x, y, w, h).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| objType | (undocumented) | (undocumented)
|
The type of object to create. |
| instName | (undocumented) | (undocumented)
|
The name to create the object with. |
| x | (undocumented) | (undocumented)
|
(undocumented) |
| y | (undocumented) | (undocumented)
|
(undocumented) |
| w | (undocumented) | (undocumented)
|
(undocumented) |
| h | (undocumented) | (undocumented)
|
(undocumented) |
CreateCharacter
TODO: WIP. Argument order is GROUND:(charType, instName, x, y, actionFunc, thinkFunc).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| objType | (undocumented) | (undocumented)
|
The type of character to create. |
| instName | (undocumented) | (undocumented)
|
The name to create the character with. |
| x | (undocumented) | (undocumented)
|
(undocumented) |
| y | (undocumented) | (undocumented)
|
(undocumented) |
| actionFunc | (undocumented) | (undocumented)
|
(undocumented) |
| thinkFunc | (undocumented) | (undocumented)
|
(undocumented) |
RemoveObject
Deletes an object from the ground map, identified by its instance name. Argument order is GROUND:RemoveObject(instName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| instName | String | System.String
|
The instance name of the object. |
Returns
Returns true if succeeded, false otherwise.
RemoveCharacter
Deletes a character from the ground map, identified by its instance name. Argument order is GROUND:RemoveCharacter(instName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| instName | String | System.String
|
The instance name of the character. |
Returns
Returns true if succeeded, false otherwise.
CreateCharacterFromCharData
Creates a ground character, given a dungeon character. Argument order is GROUND:CreateCharacterFromCharData(instName, dunCh, x, y, dir).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| instName | String | System.String
|
The instance name to give the character |
| dunCh | Dungeon Character | RogueEssence.Dungeon.Character
|
Character data to create from |
| x | Integer | System.Int32
|
X coordinate of the character |
| y | Integer | System.Int32
|
Y coordinate of the character |
| dir |
|
Direction the character will face, defaults to Dir8.Down |
RefreshPlayer
Reloads the controllable player's character data to be the current team's leader.
SetPlayer
Sets the controllable player to use new character data. Argument order is GROUND:SetPlayer(charData).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| charData | Character Data | RogueEssence.Dungeon.CharData
|
The new character data to use for the player |
SpawnerDoSpawn
Make the specified spawner run its spawn method. Argument order is GROUND:SpawnerDoSpawn(spawner).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| spawner | String | System.String
|
The name of the spawner to run the spawn method of. |
Returns
The ground character spawned.
SpawnerSetSpawn
Sets the character to the specified spawner. Argument order is GROUND:SpawnerSetSpawn(spawner, chara).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| spawner |
|
The spawner to set the character to, by name | |
| chara | Character Data | RogueEssence.Dungeon.CharData
|
The character to spawn. |
GROUND:CharTurnToChar(RogueEssence.Ground.GroundChar,RogueEssence.Ground.GroundChar)
Makes a character turn to face another character instantly.
Arguments
turnchar: The character that is turning.turnto: The character to turn to.
GROUND:CharTurnToCharAnimated
Makes a character do an animated turn to face another character over the specified time. Clockwise or counter-clockwise are chosen based on the closest direction. Waits until the operation is completed.
Arguments
curch: Character that is turningturnto: Character to turn toframedur: Time spent on each direction, in frames
Example
CharTurnToCharAnimated(charFrom, charTo, 3)
GROUND:EntTurn(RogueEssence.Ground.GroundEntity,RogueElements.Dir8)
Makes a ground entity turn to face a direction.
Arguments
ent: The ground entity. Can be a character or object.direction: The direction to face.
GROUND:CharAnimateTurn
Makes a character do an animated turn to face a chosen direction over the specified time. Must specify clockwise or counter-clockwise. Waits until the operation is completed.
Arguments
ch: The character to turndirection: The direction to turn toframedur: The time spent in each intermediate direction, in framesccw: false if clockwise, true if counter-clockwise
Example
GROUND:CharTurnToCharAnimated(charFrom, Dir8.Left, 3, true)
GROUND:CharAnimateTurnTo
Makes a character do an animated turn to face a chosen direction over the specified time. Waits until the operation is completed.
Arguments
ch: The character to turndirection: The direction to turn toframedur: The time spent in each intermediate direction, in frames
Example
CharAnimateTurnTo(charFrom, Dir8.Left, 3)
GROUND:TeleportTo(RogueEssence.Ground.GroundEntity,System.Int32,System.Int32,RogueElements.Dir8,System.Int32)
Repositions the ground entity in a specified location.
Arguments
ent: The ground entity to repositionx: The X coordinate of the destinationy: The Y coordinate of the destinationdirection: The direction to point the entity. Defaults to Dir8.None, which leaves it untouched.height: None
GROUND:MoveInDirection
Make ground character move in a direction.
Arguments
chara: Character to movedirection: Direction to move induration: Duration of movement, in framesrun: True if using a running animation, false otherwisespeed: Speed in pixels per frame
Example
GROUND:MoveInDirection(player, Dir8.Down, 24, false, 2)
GROUND:MoveToPosition
Make ground character move to a position.
Arguments
chara: Character to movex: X coordinate of destinationy: Y coordinate of destinationrun: True if using a running animation, false otherwisespeed: Speed in pixels per frame
Example
GROUND:MoveInDirection(player, 200, 240, false, 2)
GROUND:MoveToMarker
Make ground character move to a ground marker.
Arguments
chara: Character to movemark: GroundMarker object ot move torun: True if using a running animation, false otherwisespeed: Speed in pixels per frame
Example
GROUND:MoveInDirection(player, marker, false, 2)
GROUND:MoveObjectToPosition
Make ground object move to a position.
Arguments
ent: Ground Entity to movex: X coordinate of destinationy: Y coordinate of destinationspeed: Speed in pixels per frame
Example
GROUND:MoveInDirection(player, 200, 240, 2)
GROUND:AnimateInDirection
Make a ground character move in a direction with custom animation
Arguments
chara: Character to moveanim: Name of the animationanimDir: Direction of animationdirection: Direction to move induration: Duration of movement, in framesanimSpeed: Speed of animation, where 1.0 represents normal speedspeed: Speed movement, in pixels per frame
Example
GROUND:AnimateInDirection(player, "Hurt", Dir8.Down, 24, 0.5, 2)
GROUND:AnimateToPosition
Make a ground entity move to a position with custom animation
Arguments
ent: Entity to moveanim: Name of the animationanimDir: Direction of animationx: X coordinate of the destinationy: Y coordinate of the destinationanimSpeed: Speed of animation, where 1.0 represents normal speedspeed: Speed movement, in pixels per frameheight: Height of the destination
Example
GROUND:AnimateToPosition(player, "Hurt", Dir8.Down, 200, 240, 0.5, 2, 0)
GROUND:CharSetEmote(RogueEssence.Ground.GroundChar,System.String,System.Int32)
Make a character emote on the ground map.
Arguments
chara: Character to emoteemoteid: ID of the emotecycles: The number of times to play the emote.
GROUND:CharSetDrawEffect(RogueEssence.Ground.GroundChar,RogueEssence.Dungeon.DrawEffect)
Sets the ground character's draw effect to become invisible, shaking, still, etc.
Arguments
chara: Target ground character.effect: The draw effect.
GROUND:CharEndDrawEffect(RogueEssence.Ground.GroundChar,RogueEssence.Dungeon.DrawEffect)
Sets the ground character's draw effect to become invisible, shaking, still, etc.
Arguments
chara: Target ground character.effect: The draw effect.
GROUND:CharGetAnimFallback(RogueEssence.Ground.GroundChar,System.String)
Gets the fallback animation for the character.
Arguments
chara: Noneanim: The anim to get the fallback anim of.
Returns
The fallback animation, as a string. Blank if there is none. Will return anim if anim already exists.
GROUND:CharGetAnim(RogueEssence.Ground.GroundChar)
Gets a character's current animation as a string.
Arguments
chara: None
GROUND:CharGetAnimPoint(RogueEssence.Ground.GroundChar,RogueEssence.Content.ActionPointType)
Gets the chosen action point of the character at this specific frame.
Arguments
chara: NoneactionPoint: The ype of action point to retrieve the coordinates for.
Returns
The location of the action point in absolute coordinates on the map.
GROUND:CharSetAnim(RogueEssence.Ground.GroundChar,System.String,System.Boolean)
Set a character's animation.
Arguments
chara: Character to animateanim: Name of the animationloop: Whether to loop the animation
GROUND:CharEndAnim(RogueEssence.Ground.GroundChar)
Stops a character's current animation, reverting them to default idle.
Arguments
chara: Character to stop animating
GROUND:CharWaitAnim
Makes the character perform an animation and waits until it's over.
Arguments
ent: Character to animateanim: Animation to play
Example
GROUND:CharWaitAnim(player, "Hurt")
GROUND:CharSetAction(RogueEssence.Ground.GroundChar,RogueEssence.Ground.GroundAction)
Set a character's action.
Arguments
chara: Character to perfom the actionaction: The action to perform
GROUND:CharWaitAction
Makes the character perform an action and waits until it's over.
Arguments
ent: Character to animateaction: Action to perform
Example
GROUND:CharWaitAction(player, action)
GROUND:ObjectSetAnim(RogueEssence.Ground.GroundObject,System.Int32,System.Int32,System.Int32,RogueElements.Dir8,System.Int32)
Sets a ground object's animation. After it finishes, it will return to the default animation.
Arguments
obj: The object to animateframeTime: The duration of each frame of animationstartFrame: The start frame of animationendFrame: The end frame of animationdir: The direction of the animationcycles: The number of times to repeat the animation
GROUND:ObjectSetDefaultAnim(RogueEssence.Ground.GroundObject,System.String,System.Int32,System.Int32,System.Int32,RogueElements.Dir8)
Sets a ground object's default animation.
Arguments
obj: The object to animateanimName: The name of the animationframeTime: The duration of each frame of animationstartFrame: The start frame of animationendFrame: The end frame of animationdir: The direction of the animation
GROUND:ObjectWaitAnimFrame
Waits for the object to reach a specific frame before continuing.
Arguments
obj: The object ot wait onframe: The frame of animation to wait on.
Example
GROUND:WaitObjectAnim(fountain, 3)
GROUND:PlayVFX(RogueEssence.Content.FiniteEmitter,System.Int32,System.Int32,RogueElements.Dir8)
Plays a VFX using a finite emitter that generates BaseAnims.
Arguments
emitter: The VFX emitterx: X positiony: Y Positiondir: Direction to orient the VFX, defaults to Down
GROUND:PlayVFX(RogueEssence.Content.FiniteEmitter,System.Int32,System.Int32,RogueElements.Dir8,System.Int32,System.Int32)
Plays a VFX that has a start position and an end position. It uses a finite emitter that generates BaseAnims.
Arguments
emitter: The VFX emitterx: Start X positiony: Start Y Positiondir: Direction to orient the VFX, defaults to Down.xTo: End X positionyTo: End Y position
GROUND:PlayVFXAnim(RogueEssence.Content.BaseAnim,RogueEssence.Content.DrawLayer)
Plays a VFX using just a BaseAnim
Arguments
anim: The animation to playlayer: The layer to put it on
GROUND:MoveScreen(RogueEssence.Content.ScreenMover)
Plays a screen-moving effect.
Arguments
mover: The screen mover.
GROUND:HandoutEXP
Gives a character a set amount of EXP. Also handles leveling up and learning new moves.
Arguments
character: The characters to level up.experience: The amount of EXP to gain.
GROUND:LevelUpChar
Levels up a character a certain amount of times all at once. Also handles learning new moves.
Arguments
character: The characters to level up.numLevelUps: The number of level ups.
GROUND:AddMapStatus(System.String)
Adds a mapstatus to the ground map. Map statuses only have an aesthetic effect in ground maps.
Arguments
statusIdx: The ID of the Map Status
GROUND:RemoveMapStatus(System.String)
Removes a map status from the ground map.
Arguments
statusIdx: The ID of the Map Status to remove.
