Ground (functions)

From PMDOWiki
Revision as of 19:13, 26 November 2025 by Imbion (talk | contribs) (Created page with "{{Cleanup}} == GROUND:Hide(System.String) == Hides an entity. === Arguments === * <code>entityname</code>: The name of the entity to hide. == GROUND:Unhide(System.String) == Unhides an entity. === Arguments === * <code>entityname</code>: The name of the entity to unhide. == GROUND:CreateObject(System.String,System.String,System.Int32,System.Int32,System.Int32,System.Int32) == TODO: WIP === Arguments === * <code>objtype</code>: None * <code>instancename<...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This article is in need of cleanup to increase its quality. You can help PMDO Wiki by improving it.


GROUND:Hide(System.String)

Hides an entity.


Arguments

  • entityname: The name of the entity to hide.

GROUND:Unhide(System.String)

Unhides an entity.


Arguments

  • entityname: The name of the entity to unhide.

GROUND:CreateObject(System.String,System.String,System.Int32,System.Int32,System.Int32,System.Int32)

TODO: WIP


Arguments

  • objtype: None
  • instancename: None
  • x: None
  • y: None
  • w: None
  • h: None

GROUND:CreateCharacter(System.String,System.String,System.Int32,System.Int32,System.String,System.String)

TODO: WIP


Arguments

  • chartype: None
  • instancename: None
  • x: None
  • y: None
  • actionfun: None
  • thinkfun: None

GROUND:RemoveObject(System.String)

Deletes an object from the ground map, identified by its instance name.


Arguments

  • instancename: The instance name of the object.

Returns

Returns true if succeeded, false otherwise.

GROUND:RemoveCharacter(System.String)

Deletes a character from the ground map, identified by its instance name.


Arguments

  • instancename: The instance name of the object.

Returns

Returns true if succeeded, false otherwise.

GROUND:CreateCharacterFromCharData(System.String,RogueEssence.Dungeon.Character,System.Int32,System.Int32,RogueElements.Dir8)

Creates a ground character, given a dungeon character.


Arguments

  • instancename: The instance name to give the character
  • data: Character data to create from
  • x: X coordinate of the character
  • y: Y coordinate of the character
  • direction: Direction the character will face, defaults to Dir8.Down

GROUND:RefreshPlayer

Reloads the controllable player's character data to be the current team's leader.


GROUND:SetPlayer(RogueEssence.Dungeon.CharData)

Sets the controllable player to use new character data


Arguments

  • charData: The new character data

GROUND:SpawnerDoSpawn(System.String)

Make the specified spawner run its spawn method.


Arguments

  • spawnername: None

Returns

The ground character spawned.

GROUND:SpawnerSetSpawn(System.String,RogueEssence.Dungeon.CharData)

Sets the character to the specified spawner


Arguments

  • spawnername: The spawner to set the character to, by name
  • spawnChar: 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 turning
  • turnto: Character to turn to
  • framedur: 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 turn
  • direction: The direction to turn to
  • framedur: The time spent in each intermediate direction, in frames
  • ccw: 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 turn
  • direction: The direction to turn to
  • framedur: 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 reposition
  • x: The X coordinate of the destination
  • y: The Y coordinate of the destination
  • direction: 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 move
  • direction: Direction to move in
  • duration: Duration of movement, in frames
  • run: True if using a running animation, false otherwise
  • speed: 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 move
  • x: X coordinate of destination
  • y: Y coordinate of destination
  • run: True if using a running animation, false otherwise
  • speed: 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 move
  • mark: GroundMarker object ot move to
  • run: True if using a running animation, false otherwise
  • speed: 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 move
  • x: X coordinate of destination
  • y: Y coordinate of destination
  • speed: 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 move
  • anim: Name of the animation
  • animDir: Direction of animation
  • direction: Direction to move in
  • duration: Duration of movement, in frames
  • animSpeed: Speed of animation, where 1.0 represents normal speed
  • speed: 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 move
  • anim: Name of the animation
  • animDir: Direction of animation
  • x: X coordinate of the destination
  • y: Y coordinate of the destination
  • animSpeed: Speed of animation, where 1.0 represents normal speed
  • speed: Speed movement, in pixels per frame
  • height: 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 emote
  • emoteid: ID of the emote
  • cycles: 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: None
  • anim: 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: None
  • actionPoint: 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 animate
  • anim: Name of the animation
  • loop: 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 animate
  • anim: 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 action
  • action: The action to perform

GROUND:CharWaitAction

Makes the character perform an action and waits until it's over.


Arguments

  • ent: Character to animate
  • action: 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 animate
  • frameTime: The duration of each frame of animation
  • startFrame: The start frame of animation
  • endFrame: The end frame of animation
  • dir: The direction of the animation
  • cycles: 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 animate
  • animName: The name of the animation
  • frameTime: The duration of each frame of animation
  • startFrame: The start frame of animation
  • endFrame: The end frame of animation
  • dir: The direction of the animation

GROUND:ObjectWaitAnimFrame

Waits for the object to reach a specific frame before continuing.


Arguments

  • obj: The object ot wait on
  • frame: 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 emitter
  • x: X position
  • y: Y Position
  • dir: 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 emitter
  • x: Start X position
  • y: Start Y Position
  • dir: Direction to orient the VFX, defaults to Down.
  • xTo: End X position
  • yTo: End Y position

GROUND:PlayVFXAnim(RogueEssence.Content.BaseAnim,RogueEssence.Content.DrawLayer)

Plays a VFX using just a BaseAnim


Arguments

  • anim: The animation to play
  • layer: 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.