Interaction ​
Inherits: Resource
Inherited by: ConversationInteraction, CraftingInteraction, EntityInteraction, GrantQuestInteraction, InteractableObjectInteraction, ShowUIPanelInteraction, SpeakInteraction, TrainerInteraction, VendorInteraction
Base class for all entity interactions Provides the foundation for different types of NPC interactions
Variables ​
float | interaction_distance | 2.0 |
Variant | entity | |
GameHost.SystemHub | system_hub |
Methods ​
void | set_entity_reference( new_entity: Variant, p_system_hub: GameHost.SystemHub ) |
void | setup_for_interactable_objects( interactable: InteractableObject ) |
bool | can_interact( player: Player ) |
String | get_block_reason( _entity: Entity ) |
bool | needs_use_time( _entity: Entity ) |
void | start_interaction( _player: Player ) |
void | end_interaction() |
Variable descriptions ​
float interaction_distance = 2.0 ​
Range needed for interaction
Variant entity ​
Reference to the entity this interaction belongs to
GameHost.SystemHub system_hub ​
Refrence to the combat manager
Method descriptions ​
void set_entity_reference( new_entity: Variant, p_system_hub: GameHost.SystemHub ) ​
Set the entity reference
void setup_for_interactable_objects( interactable: InteractableObject ) ​
Sets the interaction up on its object. Nothing by default.
bool can_interact( player: Player ) ​
Check if the player can interact with this interaction
String get_block_reason( _entity: Entity ) ​
Why the interaction cannot start now ("" = it can, or it says nothing): the user is told when can_interact is false
bool needs_use_time( _entity: Entity ) ​
Does this use take the time the object asks for (its use time) right now? An interaction that is only a second look at something that is already there (a loot window with loot waiting) says no
void start_interaction( _player: Player ) ​
Start the interaction with the given player
void end_interaction() ​
End the current interaction