Ground (functions)/Entity Turning

From PMDOWiki

CharTurnToChar

Makes a character turn to face another character instantly. Argument order is GROUND:CharTurnToChar(turner,turnTo).

Arguments

Name Type Technical Type Purpose
turner Ground Character RogueEssence.Ground.GroundChar The character that is turning.
turnTo Ground Character RogueEssence.Ground.GroundChar The character to turn to.

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. Argument order is GROUND:CharTurnToCharAnimated(turner, turnTo, dur).

Arguments

Name Type Technical Type Purpose
turner Ground Character RogueEssence.Ground.GroundChar Character that is turning
turnTo Ground Character RogueEssence.Ground.GroundChar Character to turn to
dur Integer System.Int Time spent on each direction, in frames

Example


CharTurnToCharAnimated(charFrom, charTo, 3)

EntTurn

Makes a ground entity turn to face a direction. Argument order is GROUND:EntTurn(entity, dir).

Arguments

Name Type Technical Type Purpose
entity Ground Entity RogueEssence.Ground.GroundEntity
dir Direction ogueElements.Dir8 The direction to face.

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. Argument order is GROUND:CharAnimateTurn(chara, dir, dur, isCounterClockwise).

Arguments

Name Type Technical Type Purpose
entity Ground Entity RogueEssence.Ground.GroundEntity
dir Direction RogueElements.Dir8 The direction to face.
name=isCounterClockwise type=Boolean techt=System.Bool purp=false if clockwise, true if counter-clockwise

}}

Example


GROUND:CharTurnToCharAnimated(charFrom, Dir8.Left, 3, true)

CharAnimateTurnTo

Makes a character do an animated turn to face a chosen direction over the specified time. Waits until the operation is completed. Argument order is GROUND:CharAnimateTurnTo(chara, dir, dur).

Arguments

Name Type Technical Type Purpose
chara (undocumented) (undocumented) The character to turn
dir (undocumented) (undocumented) The direction to turn to
dur (undocumented) (undocumented) The time spent in each intermediate direction, in frames

Example


CharAnimateTurnTo(charFrom, Dir8.Left, 3)