Hello Ownedcore, so I recently started to work on a new boss with some great ideas, now i've ran into an issue which I am clueless about since it does not give an error in world.exe or what so ever.
So basicly what I want is when players get in approx 40 yard distance (or less) that the boss will say something and continue with a small cinematic. I've made a trigger npc but still it doesnt work (thought that the boss might stand to high on the throne so I made a trigger npc). Now I spawned everything but when I get into 40 yards of the trigger (or less) nothing happens, no error shown in world.exe.

As you can see the trigger is on the ground and the boss is standing in front of the throne.
Script I currently have which does not function right:
Code:
local BossEntryID = 77002
local GuardDosEntryID = 77001
local GuardUnoEntryID = 77000
local TalkTriggerEntryID = 66000
function TT(pUnit, event)
TalkTrigger = pUnit
end
function GA(pUnit, event)
Boss = pUnit
end
function GAN(pUnit, event)
GuardDos = pUnit
end
function GR(pUnit, event)
GuardUno = pUnit
end
RegisterUnitEvent(BossEntryID, 18, "GA")
RegisterUnitEvent(GuardDosEntryID, 18, "GAN")
RegisterUnitEvent(GuardUnoEntryID, 18, "GR")
RegisterUnitEvent(TalkTriggerEntryID, 18, "TT")
function Boss_OnSpawn(pUnit, Event)
Boss:SetFaction(14)
Boss:SetCombatCapable(1)
Boss:Root()
Boss:WipeTargetList()
GuardUno:SetFaction(14)
GuardUno:SetCombatCapable(1)
GuardUno:Root()
GuardUno:WipeTargetList()
GuardDos:SetFaction(14)
GuardDos:Root()
GuardDos:SetCombatCapable(1)
GuardDos:WipeTargetList()
Boss:RegisterEvent("Check_For_Players_Boss", 2000, 0)
end
function Check_For_Players_Boss(pUnit)
local plr = pUnit:GetClosestPlayer()
if plr ~= nil then
if TalkTrigger:GetDistanceYards(plr) < 40 then -- Replaced "pUnit" by "TalkTrigger" both didnt work
Boss:SendChatMessage(14,0,"Well well, what do we have here..")
Boss:RegisterEvent("BossCinematic1", 4000, 1)
end
end
end
I hope someone can help me out.
-DaynNight