One thing I've found is that simply spawning an invisible creature within a trigger doesn't always/ever fire a trigger's OnEnter event - which is needed for the GetIsInSubArea function or whatever you are planning to do in the trigger's OnEnter script. So if you plan to use the creature method to determine if something is within a trigger, you will likely need to create the creature and then jump it to the spot you want to test. Even if it's spawned in the trigger, jumping it to its same location will then still work to fire the trigger's OnEnter event.
wow, talk about jumping through hoops just to make sure it works right. O_O
i'm often as surprised that bioware forgot some of the most basic things as i am about how great the game is.
good info, though, thanks !
Just a shot in the dark here, but couldn't you use GetSpellTargetLocation(location lTarget) and compare it with GetLocation(object oTrigger)?
i'd have to know beforehand what kind of trigger or aoe it is, since GetLocation(object oTrigger) returns the starting coordinate for a polygonal trigger but the centre point for a circular aoe, and the triggers/areas may vary in size and shape. :/
Assuming you don't need really irregular shapes for this you may be able to get away with just using a waypoint and checking that the targeted location is within a certain distance of the waypoint.
yeah, i'm beginning to think i should just go back and rework my basic approach to use something other than triggers. waypoints would work, for spherical areas.
basically what i'm looking for is a way to add 'terrain awareness' ; to circumscribe a given area, inside of which certain things would be allowed and outside of which they wouldn't. the constraints suggested using a trigger, but obviously that won't work if action has to be carried out at a distance. as an off-the-cuff example, suppose i want to require that casters may summon fire elementals only if a lava source is nearby, or water elementals only if a water source is nearby. i could then place a trigger around a pool of water so that a caster could target the spell within the confines of the trigger (i.e. the pool) and the summons would succeed, but outside it would fail. but apparently there's no way for me to tell if GetSpellTargetLocation() is within the confines of the pool (trigger).