Sighted events - Who does the seeing?

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Bob_The_Mighty
Posts: 870
Joined: July 13th, 2006, 1:15 pm

Sighted events - Who does the seeing?

Post by Bob_The_Mighty »

Ive been toying with a stealth mod and I've been experimenting with ai behaviour, but there is one thing I cannot pin down. I can use sighted events or [filter_vision] to determine a unit that has been seen by the enemy, but I cannot determine which units are doing the seeing. In other words, I can store and manipulate the visible unit (Bob), but I can't find a reliable way to store and manipulate the unit/s that can see Bob.

Sighted events appear to have automatic variables ($x2,$y2), but the seeing unit may well not be in that hex when it completes its move. Besides, what happens if multiple units all see Bob at the same time? I've tried various combinations of unit and location filters, but none do the job. Can anyone suggest a solution or workaround?

A related issue concerns the player option to 'delay shroud updates'. The wiki says sighted events will be delayed for players until the option is turned off. I've tried to test that but it actually seems to work immediately, even when the option is turned on. Is the wiki out of date or did I misunderstand?
My current projects:
MP pirate campaign: The Altaz Mariners
RPG sequel: Return to Trent
MP stealth campaign: Den of Thieves
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

Re: Sighted events - Who does the seeing?

Post by vghetto »

Isn't second_unit always assigned even though $x2,$y2 are not?
Post Reply