Had a brain wave last night, can't expand upon it till i'm at work though (spoiler, Stephen L's trap script could be easily modded to do what you want here) Watch this space: edit: now i'm at work i'll explain... Ok, here goes. Currently Stephen's script allows you to put a token on the GM layer which when walked over (please note you'll also need the TokenCollisions and Vector Math scripts!) will trigger a message to chat and/or bring the token to the map layer for the players to see. My thinking here is that if you are basing your guards vision on a set distance then you could simply place a token on the GM layer that triggers the scripts natural response: if(trap) {
sendChat("Admiral Ackbar", "IT'S A TRAP!!! " + obj.get("name") + " set off a trap!");
moveTokenToTrap(obj, trap); and quick hack that to read: if(trap) {
sendChat("Guard", "HALT!!! " + obj.get("name") + " was spotted by a guard!");
moveTokenToTrap(obj, trap); This is super restrictive for obvious reasons as i'm essentially proposing hard coding the name Guard and his response of Halt as well as the fact that the PC has 'been spotted by a guard' as opposed to any other action you would want to use this for. It also returns the token to the point at which the 'trap' is triggered which i find handy for those pesky players who move too far too quickly lol. Greater minds than mine, or at least more experienced coders, would no doubt be able to take this section of the script and modify it to use the GM layer tokens GM notes to provide specific output without ruining the scripts versatility re: traps etc. They could probably also make it so that the GM layer token name could be used to prefix the output... If they could it would mean that you could put a token on the GM layer, give it a name of Guard or whatever and put in the GM notes HALT!!! and with wizardry when the 'trap' was triggered (please note, by just using the web status marker nothing would be moved to the map layer either ;) ) it would give the same output 'Guard: HALT!!!' without the need to hard code it. This would work best with guards who have easily 'guarded' approaches such as narrow corridors, or stationary guards who you could set a large token on the gm layer to represent their 'sight'. For your patrolling guards it would be somewhat harder and it is way beyond me to think of a way of getting a script to recognise a tokens 'sight' in the sense of actually spotting someone while patrolling... Like i said, this is a quick hack with potential for greater flexibility. ^^^^^^^^^^^^^ All of that being said, i'm sure Aaron can develop something that could do exactly what you need but i know for a fact his list is Looooooooong!