• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

NPC talkRadius for specified NPCs

Hermes

dziwki kola gramy w lola
Joined
Nov 17, 2007
Messages
1,867
Reaction score
14
Location
Poland
Hi there!

I want to make travel NPCs responding only when player is near this NPC (1sqm). There is in modules something like "talkRadius"
Code:
talkRadius = 4,
and this will set talkRadius for ALL NPCs. I want to make it only for travel NPCs. How to specify talkRadius to for ex. one NPC?

Or how to make group of NPCs which will have talkRadius = 1?


Aww, no idea.. There must be a way to add in LUA something like type of NPC (travel).
 
Last edited:
i was uncertain should i make new thread or post on this one. But this one is several years old xD

Whatever, the issue is same.
How do i set talkRadius to an NPC

I am using TFS 1.1

I tried to add it to .xml file, but it had no effect

EDIT..
ofcourse after i post i notice its not in the support thread..
but request and support is kinda same thing. riiiight?
 
Code:
npcHandler.talkRadius = 1

Yep, it worked.

For side note.
the value presents 1 tile.
and this code have to be written inside the lua script under this code:
Code:
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
npcHandler.talkRadius = 2
 
Back
Top