Alright, I set up these regions on my map where I want AI dead if they stray into them. They don't seem to be working at all. I double-checked that the regions were in the correct layer, etc. My code in the LUA:
ActivateRegion("ai1")
OnEnterRegion(
function(regIn, character)
if not IsCharacterHuman(character) then
KillObject(character)
end
end,
"ai1"
)
Why isn't this working? Everything looks to be without errors and typos to me. Or...is there a simpler way to set up a region that only kills AI and not humans?
AI Deathregions
Moderator: Moderators
- jangoisbaddest
- Lieutenant General

- Posts: 661
- Joined: Mon Feb 27, 2006 12:10 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: All Along The Watchtower
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: AI Deathregions
Not sure if it would do anything, but try moving the ActivateRegion line after the rest of the code. If I remember correctly, that was how you activated the regions for a teleporter. Might be the same here.
