Here is my function:
Code: Select all
OnEnterRegion(
function(region,character)
if GetEntityName(region) == ("tombcastle_panel") then
ActivateRegion("tombcastle")
end
end,
"tombcastle_panel"
)I also have a question that would help eliminate the panel region entirely:
If I use OnObjectKill for the panel, and that activates the teleport region,
then I have a region at the other end that turns off the region and puts the panel back,
If I use OnLeaveRegion> RespawnObject, will that make the panel come back to life?
EDIT: I put the function in code format so it represented the tabs correctly.
EDIT2
(Sorry about double post)
Ok, so I got it to not crash, but the teleport region doesn't turn on.
Code: Select all
Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: bad argument #2 to `OnEnterRegion' (string expected, got no value)
stack traceback:
[C]: in function `OnEnterRegion'
(none): in function `ScriptPostLoad'Code: Select all
ActivateRegion("tombcastle_panel")
OnEnterRegion(
function(regIn,character)
MoveEntityToNode(character,"tombcastle_node")
end,
"tombcastle"
)
OnEnterRegion(
function(region,character)
if GetEntityName(region) == ("tombcastle_panel") then
ActivateRegion("tombcastle")
end
end
)
end

