Mod:Knightcore/ActorsKC: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
The following functions are found in the <code>ActorsKC.lua</code> file in [[Mod:Knightcore|Knightcore]]. These functions can be called from other lua script files by including the line <code>require 'knightcore.ActorsKC'</code>, and then called with the prefix <code>ActorsKC</code>. | The following functions are found in the <code>ActorsKC.lua</code> file in [[Mod:Knightcore|Knightcore]]. These functions can be called from other lua script files by including the line <code>require 'knightcore.ActorsKC'</code>, and then called with the prefix <code>ActorsKC</code>. | ||
Note: Functions with an asteric next to their headers are imported from Halycon. | Note: Functions with an asteric next to their headers are imported from Halycon. | ||
Revision as of 19:25, 30 September 2025
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.
