I have been thinking about the different methods of developing a wall trap that is triggered via line of sight. I can think of a few programmatic ways to achieve this, and I'm curious as to which ones you think are best, and why?
1. At world start, a wall trap looks up the tiles in front of it continuing in one direction until it reaches another wall and "subscribes" them to a look up list. If these tiles are entered, they will "tell" the trap someone is there and the trap will trigger.
^While I understand the concept of this one, I've not developed it yet.
2. A trigger area (put on the map) manually connected to the trap. When the area is entered, the trap is triggered.
^Really easy, but will not allow any extra areas to be used where it is taking up space.
3. Default turf behavior is to check for nearby traps every time its entered, trigger trap if conditions are met.
Any other ideas?
May 22 2012, 12:51 pm