class

PointClickEngine::Characters::ScriptableCharacter

Inherits PointClickEngine::Characters::Character < PointClickEngine::Characters::Talkable < PointClickEngine::Core::GameObject < PointClickEngine::Core::Drawable < Reference < Object

Scriptable character that replaces complex AI behaviors with Lua scripts

Constructors

new(name : String, position : RL::Vector2, size : RL::Vector2)
Source

Instance methods

auto_update

Script-driven behavior properties

Source
auto_update=(auto_update : Bool)

Script-driven behavior properties

Source
cleanup

Cleanup event subscriptions

Source
custom_properties
Source
custom_properties=(custom_properties : Hash(String, String))
Source
execute_script_function(function_name : String, *args)

Execute custom script function

Source
get_property(key : String) : String
Source
last_update
Source
last_update=(last_update : Float32)
Source
load_script(file_path : String)
Source
on_interact(interactor : Character)

Abstract methods that must be implemented by subclasses

Source
on_look
Source
on_talk
Source
say(text : String, &block : -> Nil)

Override say to trigger events

Source
script_content
Source
script_content=(script_content : String | Nil)
Source
script_file
Source
script_file=(script_file : String | Nil)
Source
set_property(key : String, value : String)
Source
set_script(script_content : String)
Source
stop_walking

Stops the character's movement immediately

Source
update(dt : Float32)

Updates the character's state, movement, and animation

Source
update_interval
Source
update_interval=(update_interval : Float32)
Source
walk_to(target : RL::Vector2)

Override movement to trigger events

Source