Try this, it works for me.
agendaclue = 0
function lea_init(e)
Include("conversation_npc_1.lua")
Include("conversation_npc_2.lua")
end
function lea_main(e)
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 60 and g_PlayerHealth > 0 then
if agendaclue > 0 then
SwitchScript(e,"conversation_npc_1")
else
SwitchScript(e,"conversation_npc_2")
end
end --PlayerDist
end --main
hth
As you can notice, there is a global variable "agendaclue = 0", take care to pass the value, via your script.
What I did:
a-Place 2 barrels plus player market in a blank map.
b-Attached "lea.lua" to one, and I wrote some script than pass "agendaclue = 1", and attached it to the other barrel.
If I go to the firts one, I get the converstion2, and the conversation1, in the other one.
3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz
OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics