Talkable NPC
Last updated
Last updated
Go to the AI/ folder and drag ai_npc.tscn on the scene.
NPC has a different type, it's not level_object. But it has some parameters that player can change in editor inside inspector. ID - string of npc profile ID from assets/creatures/characters.json*
Is Hostile - turn on/off enemy state. If ON then Eyezone ID, Attack anims and Start anims is required!
Eyezone ID - ID of eyezone on the level (first create eyezone, then put your own id inside keys of eyezone and then duplicate this id to Hostile NPC)
Attack Animations - list of attacking animations for combat when player is inside eyezone. Hold mouse on this field and tooltip will show what type of animations is available.
Start Animation - animation that will be player when Enemy NPC will spawn.
But now we need only ID in NPC PROFILE group because our npc will be friendly.
Let's put the trader's ID into this NPC.
All animations of the friendly NPC will be player from characters.json file on spawn.
When we'll start game our NPC will be in sit pose.