scroll_to_unit behaviour seems to have changed
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.
- Spannerbag
- Posts: 535
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
scroll_to_unit behaviour seems to have changed
Hi,
I'm developing a campaign and notice that [scroll_to_unit] seems to have started to behave differently.
Prior to 1.14.4 [scroll_to_unit] accepted a [filter] and worked fine.
Now it either does nothing apparently or scrolls to a seemingly random place on screen.
I have seen this behaviour on 1.14.4 and 1.14.5. I'm using a Windows 7 PC.
Granted, I could do the above with a simple [modify_unit] and will do so if necessary, but I think it's more fun for the player if things are visual.
I make quite heavy use of scroll_to_unit and I'd rather not redesign if possible.
And yes, I know {FOREACH} is deprecated
I've upgraded to 1.14.5 but am still seeing this issue.
In the above code, scroll_to_unit scrolls to a different place entirely (I suspect side 1 leader).
Can't verify if floating text still works as it's off-screen.
Before I start fiddling around I just thought I'd ask if this is a known issue?
Many thanks in advance for your help and advice!
I'm developing a campaign and notice that [scroll_to_unit] seems to have started to behave differently.
Prior to 1.14.4 [scroll_to_unit] accepted a [filter] and worked fine.
Now it either does nothing apparently or scrolls to a seemingly random place on screen.
I have seen this behaviour on 1.14.4 and 1.14.5. I'm using a Windows 7 PC.
Code: Select all
#
# scroll_to_unit stopped working as coded below as from 1.14.4 afaik
#
[store_unit] # Transfer Jackery's troops to Morn
variable=AEI_Jackery_army
[filter]
side=2
[/filter]
[/store_unit]
{FOREACH AEI_Jackery_army i}
[set_variable]
name=AEI_Jackery_army[$i].side
value=1
[/set_variable]
[unstore_unit]
variable=AEI_Jackery_army[$i]
find_vacant=no
[/unstore_unit]
[scroll_to_unit]
[filter]
id=$AEI_Jackery_army[$i].id
[/filter]
[/scroll_to_unit]
[floating_text]
x,y=$AEI_Jackery_army[$i].x,$AEI_Jackery_army[$i].y
text= _ "<span color='blue'>Side 1</span>"
[/floating_text]
[delay]
time=500
[/delay]
{NEXT i}
[clear_variable]
name=AEI_Jackery_army
[/clear_variable]
I make quite heavy use of scroll_to_unit and I'd rather not redesign if possible.
And yes, I know {FOREACH} is deprecated
I've upgraded to 1.14.5 but am still seeing this issue.
In the above code, scroll_to_unit scrolls to a different place entirely (I suspect side 1 leader).
Can't verify if floating text still works as it's off-screen.
Before I start fiddling around I just thought I'd ask if this is a known issue?
Many thanks in advance for your help and advice!
- Spannerbag
- Posts: 535
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: scroll_to_unit behaviour seems to have changed *fix found*
Hi all,
I noticed that [scroll_to] documentation says
Might be worth updating https://wiki.wesnoth.org/InterfaceActio ... to_unit.5D to match wording in https://wiki.wesnoth.org/InterfaceActio ... roll_to.5D ?
I noticed that [scroll_to] documentation says
So I deleted the filters and voila! It worked as beforeStandardLocationFilter, do not use a [filter_location] sub-tag.
Might be worth updating https://wiki.wesnoth.org/InterfaceActio ... to_unit.5D to match wording in https://wiki.wesnoth.org/InterfaceActio ... roll_to.5D ?