Ground (functions)/Entity Movement
From PMDOWiki
(Redirected from Ground (function)/Entity Movement)
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)
