[teleport] makes "speaker=unit" stop working

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
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

[teleport] makes "speaker=unit" stop working

Post by scott »

Based on the behavior of other unit-changing event actions, I suspect this might be an issue with how WML does things. However, in case I made a WML error I want to get a second opinion before opening a bug report.

I have a spot that teleports a unit to a new location on the map. After arriving, the unit expresses surprise. Not too unreasonable, right?

Here is what I'm trying:

Code: Select all

	[event]
	name=moveto
		[filter]
		x=12
		y=23
		side=1
		[/filter]
		[teleport]
			[filter]
			x,y=$x1,$y1
			[/filter]
			x,y=7,23
		[/teleport]
		[remove_shroud]
		x=2-4
		y=21-24
		[/remove_shroud]
		[message]
		speaker=unit
		message= _ "Hello? Who is here?"
		[/message]
...etc...
The problem is that the unit speech does not occur. I can get around this by storing the unit and using that to figure out which unit needs to speak. However, I don't think teleporting the unit off a space should make the "unit" value invalid. Is this correct thinking or did I make a WML error?
Hope springs eternal.
Wesnoth acronym guide.
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

It is probably just a shortcut for 'x,y=$x1,$y1'... I can't see any WML error.
Xan
Inactive Developer
Posts: 258
Joined: August 28th, 2005, 3:05 pm
Contact:

Post by Xan »

Dacyn is correct.
"It is time people learned about their failures and my successes."
Post Reply