First of all, I'm fairly new to this kind of customizing, so bear with me :P
I am trying to create some custom content for my server, and I'm just toying around with scripting. So my problem is: I made a simple portal to teleport me, but when I click it, nothing happens. This is my script:
Code:
function TestPortal_OnClick(pUnit, Event, pMisc)
pMisc:Teleport(1,1515,-4406,19)
end
RegisterGameObjectEvent(1000000, 4, "TestPortal_OnClick")
I suspect it has something to do with the event because the console prints this message when I click the portal:
Code:
World: CMSG_GAMEOBJ_USE: [GUID 45]
1000000 is the entry of the GO. Me clicking the portal is indeed registered, but the function isn't run :/
Lua is enabled, because my character spams "Lol" if I put this inside the script but not inside a function:
Code:
GetPlayer("Asdfwa"):SendChatMessage(1,1,"Lol",0)
Code:
<ScriptBackends LUA="1"
AS="1">
Thank you in advance!