[effect] apply_to variation not working like it did before
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.
[effect] apply_to variation not working like it did before
Am attempting to get the Era of Four Moons campaigns fixed up for 1.6
Although not troubling in gameplay, one of the events from panther lord which made the shapeshifter switch between his human and panther form isn't working as it did before. Specifically, the animation for the transformation happens correctly however the variation is not applied properly meaning that after the animation plays the panther is in whatever variation is listed first in their unit definition. After conferring with the wiki I can't see anything wrong with the code so I'm not sure if this is a bug or if something really subtle was changed.
Here is the code for the change:
In the unit, the variations are defined as follows:
Although not troubling in gameplay, one of the events from panther lord which made the shapeshifter switch between his human and panther form isn't working as it did before. Specifically, the animation for the transformation happens correctly however the variation is not applied properly meaning that after the animation plays the panther is in whatever variation is listed first in their unit definition. After conferring with the wiki I can't see anything wrong with the code so I'm not sure if this is a bug or if something really subtle was changed.
Here is the code for the change:
Code: Select all
#define TRANSFORM_TO_HUMAN
[animate_unit]
[filter]
id=keka
[/filter]
flag=pather_to_human
with_bars=yes
[/animate_unit]
[object]
[filter]
id=keka
[/filter]
silent=yes
[effect]
apply_to=variation
name=humanform
[/effect]
[/object]
#enddef
#define TRANSFORM_TO_PANTHER
[animate_unit]
[filter]
id=keka
[/filter]
flag=human_to_panther
with_bars=yes
[/animate_unit]
[object]
[filter]
id=keka
[/filter]
silent=yes
[effect]
apply_to=variation
name=pantherform
[/effect]
[/object]
#enddef
Code: Select all
[variation]
variation_name=pantherform
inherit=yes
image="panther.png"
[/variation]
[variation]
variation_name=humanform
inherit=yes
image="rehdoc.png"
[/variation]
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
- Lord-Knightmare
- Discord Moderator
- Posts: 2360
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: [effect] apply_to variation not working like it did before
it's
variation_id=
now, not variation_name=
..which is used to flip between the variationsCreator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium