Mod:Knightcore/ActorsKC

From PMDOWiki
Revision as of 19:24, 30 September 2025 by Imbion (talk | contribs)
This article is a stub. You can help PMDO Wiki by expanding it.

The following functions are found in the ActorsKC.lua file in Knightcore. These functions can be called from other lua script files by including the line require 'knightcore.ActorsKC', and then called with the prefix ActorsKC.


Note: Functions with an asteric next to their headers are imported from Halycon.

GlanceThere

Causes the actor to briefly "look" in a direction with a pause to delay continued execution.

SpyAround

Causes the actor to "look around" by rotating in several different directions in a particular way. The actor skips looking towards the direction they started on, ending on the specified direction.

Emote

The actor performs a ground emote.

EmoteAndPause

The actor performs a ground emote, and then pauses. Auto chosen timings are based off of Halycon's.

TurnToCharaAnim

Turn to another character with animation. Used over GROUND:CharTurnToCharAnimated to simplify code using the default value.

TurnToDirAnim

Turn to another direction with animation. Used over GROUND:CharAnimateTurn to simplify code using the default value.

TurnToDirAnimClosest

Turn to another direction with an animation, calculating whenever turning clockwise or counterclockwise would be "faster" for more natural movement.

DoAnimThenStop

Perform a ground animation once, and then stop immediately when done.

ConvoStillStart

Sets animation to none for all actors passed through a table. Used for "normal" conversations where the characters in the conversation stop their idle animations.

ConvoStillEnd

Stops the animations for all actors passed through a table, returning them to their idle animations.

FaceMovingCharacter*

Faces a moving character.

EightWayMove*

Walks to somewhere solely using 8 direction axis movement, first diagonally then straight.

EightWayMoveRS*

Walks to somewhere solely using 8 direction axis movement, first straight then diagonally.

RunInCircle*

Runs around in a circle.

TurnTowardsLocation*

Turns towards the specified location. Used in cases of a character having a dynamic position.

ShakeHead*

Shakes the actor's head.

Hop*

Makes the actor hop.

DoubleHop*

Makes the actor hop twice.

Recoil*

Makes the actor recoil.

Complain*

Actor jumps up twice and complains.

Shake*

Shake in place for a brief moment.

StartTremble*

Starts trembling until stopped.

EndTremble*

End the actor's trembling.