Problem killing object with OnEnterRegion function [Solved]
Posted: Tue Dec 20, 2016 11:57 pm
I added in this to my LUA
The idea is that when I enter the "wamparegion", the ruined window will dissapear. I`ve tried the OnEnterRegion function but it doesn`t "Kill" it. I`ve also tried changing the "(character)" to "(player)" just to see if that made a difference.
The "wamparegion" is also referenced by a SetupAmbushTrigger code.
Code: Select all
ActivateRegion("wamparegion")
testfunction = OnEnterRegion(
function(region, player)
if IsCharacterHuman (character) then
KillObject("yav2_bldg_window_ruin_30")
end
end,
"wamparegion"
)The "wamparegion" is also referenced by a SetupAmbushTrigger code.