WML added halos are not rendered with [move_unit]
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
WML added halos are not rendered with [move_unit]
WML-added halos appear on the unit, as expected. However, when the unit moves via
I asked for help with this problem in the WML Workshop. WhiteWolf replied:
I'm using 1.15.7 BfW.
Mac OS 10.12.6
[move_unit]
, the halo disappears while the unit moves, then reappears after the unit stops.I asked for help with this problem in the WML Workshop. WhiteWolf replied:
The problem appears with the following code.
Code: Select all
[modify_unit]
[filter]
id=Finya
[/filter]
[effect]
apply_to=halo
halo=halo/net.png
[/effect]
[/modify_unit]
[move_unit]
id=Finya
to_x=6
to_y=4
[/move_unit]
Code: Select all
[store_unit]
[filter]
id=Finya
[/filter]
variable=target_finya
[/store_unit]
[set_variable]
name=target_finya.halo
value="halo/net.png"
[/set_variable]
[unstore_unit]
variable=target_finya
find_vacant=no
[/unstore_unit]
Mac OS 10.12.6
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: WML added halos are not rendered with [move_unit]
A bit of further info:
If a unit already has a halo in [unit_type] (Mage of Light used as example), and I change the halo to something else, then if the unit is moved with [move_unit], it reverts to showing the original halo for the duration of the movement. (And then shows again the new one once stopped).
The way of changing the halo doesn't seem to matter, it's all the same with a direct halo key in [modify_unit], [effect] in modify unit, or [effect] in [object].
I think this happens because [move_unit] on the back end of things is still somewhat related to wesnoth.wml_actions.move_unit_fake, that only cares about the base [unit_type]. (And that's why we always get the vanilla halo key value in [unit_type], no matter what is changed in the actual unit).
So it's possible that it's not entirely a bug, more like a missing feature.
If a unit already has a halo in [unit_type] (Mage of Light used as example), and I change the halo to something else, then if the unit is moved with [move_unit], it reverts to showing the original halo for the duration of the movement. (And then shows again the new one once stopped).
The way of changing the halo doesn't seem to matter, it's all the same with a direct halo key in [modify_unit], [effect] in modify unit, or [effect] in [object].
I think this happens because [move_unit] on the back end of things is still somewhat related to wesnoth.wml_actions.move_unit_fake, that only cares about the base [unit_type]. (And that's why we always get the vanilla halo key value in [unit_type], no matter what is changed in the actual unit).
So it's possible that it's not entirely a bug, more like a missing feature.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: WML added halos are not rendered with [move_unit]
Verifying that I experienced this odd, unwelcome behavior, too.WhiteWolf wrote: ↑December 9th, 2020, 12:52 am A bit of further info:
If a unit already has a halo in [unit_type] (Mage of Light used as example), and I change the halo to something else, then if the unit is moved with [move_unit], it reverts to showing the original halo for the duration of the movement. (And then shows again the new one once stopped).
I had replaced a halo, so I expected that the halo would remain replaced. But the former halo returned while the unit moved, then the replacement halo came back.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.