I was playing with my recently debugged Clairaudience spell to see what players could do with it, and ran into a limitation that I do not believe I can get around.
My alternate Clairaudience spell creates a "scry sensor", an invisible creature and AOE. The two of these together send information back to the PC about what the sensor "hears". This is information coming in through various events - listening for speech, creatures moving in and out of "heard" and "inaudible" states, etc.... - and going back to the PC as messages. The nice thing about this spell in Arnheim is that I have also enabled PCs to cast spells at known locations, not just seen locations. So a PC could cast clairaudience and create a scry sensor in another area.
This has a problem. If no other PCs are in the area it appears that NPCs don't do very much. While this is great for efficiency, it doesn't do much for a PC trying to ascertain whether a dragon is guarding a cave in the next area.
So I first thought "no problem" at the top of standard heartbeat and perception scripts is a check for AI level and if it is very low the script exits. I tweaked those to override the exit if at least one scry sensor was in the area. Then I added a SendMessage at the top of the heartbeat to let me know which object was executing a heartbeat.
I entered the game. Creatures spawned in teh area. Every creature in that area was executing a HB regularly. I went to another area, and suddenly these heartbeats became much less frequent. I renentered the area, and they became regular again. My scry sensor was still working as well as it was still albeit rarely) picking up on creature movements.
Has anyone else looked into this? Do you know how often these scripts run when no players are in an area?
Modifié par henesua, 15 octobre 2012 - 12:36 .