A problem with "sighted" events in wesnoth 1.1.1

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
quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

A problem with "sighted" events in wesnoth 1.1.1

Post by quartex »

My apoligies if this problem has already been addressed, but I've been having problems with "sighted" events while I've been testing v1.1.1.

I often had problem with these types of events not firing, "moveto" events were might more dependable. I noticed that a format for "sighted" events has changed in 1.1.1. So the WML I'm now using is:

Code: Select all

[event]
name=sighted

[filter]
	side=1
[/filter]

[filter_second]
	description=Enemy Unit Name
[/filter_second]
...
And yet, when I move a unit near the target enemy and reveal his position it says "enemy unit found", but does not cause the "sighted" event to fire. When you have units with varying speeds, "sighted" events can be a lot more useful than moveto events. Does anyone know what's causing these events not to fire?
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

This is not a 1.1 bug - this has never been possible. You can have an event triggered upon the AI seeing you, but not upon you seeing the AI. I've spent countless hours verifying this, because I wanted to use such an event in Sceptre of Fire. :(

I'd be happy to be proven wrong, but I doubt it will happen. ;)



Of course, if there were changed to sighted in 1.1, its possible the bug got fixed...
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Post by quartex »

Thanks for the confirmation Turin.

This goes directly against what is documented in the WML Wiki. I wonder why this problem has never been fixed? It would seem like a really useful feature to have in Wesnoth.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

I have had events, with 1.0.2, triggering when a player unit sees a specific AI unit. The restriction that I remember is that fog must be on, as the events didn't work only with shroud.

But anyway, the apparent bug in 1.1.1 and the shroud sighted bug would be nice to get fixed, as they are indeed a great tool in scenario making.
quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Post by quartex »

zookeeper wrote:I have had events, with 1.0.2, triggering when a player unit sees a specific AI unit. The restriction that I remember is that fog must be on, as the events didn't work only with shroud.

But anyway, the apparent bug in 1.1.1 and the shroud sighted bug would be nice to get fixed, as they are indeed a great tool in scenario making.
Zookeeper, thanks, I'd completely forgotten about that catch. I'd been spending hours trying to get various "sighted" events to work on a map with no fog. The fact that sighted events don't work without fog should really be added to the WML documentation.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

Uh... I've gotten sighted events to work sin fog. It must be that sighted events where the player sees an AI, not vice versa, only work with fog. :?


Sighted has so many problems I just might give up on using it ever...
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

turin wrote:Uh... I've gotten sighted events to work sin fog. It must be that sighted events where the player sees an AI, not vice versa, only work with fog. :?


Sighted has so many problems I just might give up on using it ever...
I confirm turin's assessment.

Fog: sighted events where the player sees the AI work ok
Shroud: sighted events where the AI sees the player work but not vice-versa
Hope springs eternal.
Wesnoth acronym guide.
quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Post by quartex »

turin wrote:Sighted has so many problems I just might give up on using it ever...
I sympathize with you turin. I wrestled with it 6 months ago, and finally said "to heck with it", it's not worth the frusteration. Luckily most of my "sighted" events were just messages added for dramatic effect, and the others I replaced with "moveto" events which often work almost as well.
quartex
Inactive Developer
Posts: 2258
Joined: December 22nd, 2003, 4:17 am
Location: Boston, MA

Post by quartex »

scott wrote: Fog: sighted events where the player sees the AI work ok
Shroud: sighted events where the AI sees the player work but not vice-versa
Scott, thanks for testing this. I'm still having problems with events that happen when the AI sees the player. My unit moves into the enemy's range, the enemy moves and attacks my unit, but still the event doesn't fire. Can you print the code you used for that case, so I can test it myself?
Post Reply