Help on animate_unit tag
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.
- pyrophorus
- Posts: 533
- Joined: December 1st, 2010, 12:54 pm
Help on animate_unit tag
Hi everybody !
Here is the code which bothers me:
First part works correctly (i.e. the unit whose id is Lestiviel come back in the game), but the anim fires not. No anim, no text, nothing...
Actually, I would like to start a custom anim in this event, but I don't know exactly how to declare such an animation. Using a [extra_anim] tag seems to get the anim played forever. Can I use any tag to define an animation (like [my_defend]) ?
(IMHO, the wiki lacks some non-trivial examples here).
Thanks in advance !
LS
Here is the code which bothers me:
Code: Select all
[event]
name=side turn
first_time_only=no
[filter_condition]
[not]
[have_unit]
id=Lestiviel
[/have_unit]
[/not]
[/filter_condition]
[unstore_unit]
variable=Lestiviel_back
find_vacant=yes
[/unstore_unit]
[animate_unit]
flag=healing
hit=yes
text="Reappearing !"
[filter]
id=Lestiviel
[/filter]
with_bars=yes
[/animate_unit]
[/event]
Actually, I would like to start a custom anim in this event, but I don't know exactly how to declare such an animation. Using a [extra_anim] tag seems to get the anim played forever. Can I use any tag to define an animation (like [my_defend]) ?
(IMHO, the wiki lacks some non-trivial examples here).
Thanks in advance !
LS
HowTos: WML filtering, WML variables
Re: Help on animate_unit tag
Use a foo_anim tag in your unit .cfg.pyrophorus wrote:Hi everybody !
Here is the code which bothers me:First part works correctly (i.e. the unit whose id is Lestiviel come back in the game), but the anim fires not. No anim, no text, nothing...Code: Select all
[event] name=side turn first_time_only=no [filter_condition] [not] [have_unit] id=Lestiviel [/have_unit] [/not] [/filter_condition] [unstore_unit] variable=Lestiviel_back find_vacant=yes [/unstore_unit] [animate_unit] flag=healing hit=yes text="Reappearing !" [filter] id=Lestiviel [/filter] with_bars=yes [/animate_unit] [/event]
Actually, I would like to start a custom anim in this event, but I don't know exactly how to declare such an animation. Using a [extra_anim] tag seems to get the anim played forever. Can I use any tag to define an animation (like [my_defend]) ?
(IMHO, the wiki lacks some non-trivial examples here).
Thanks in advance !
LS
Formerly known as the creator of Era of Chaos and maintainer of The Aragwaithi and the Era of Myths.
Re: Help on animate_unit tag
And once again you should actually ignore the above. Giving people broken WML advice really seems to be in vogue these days...
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Help on animate_unit tag
hit should be hits (but the key doesn't make sense for a healing animation) and text= should be translatable but both probably don't break the thing.
I'd try triggering [foo_anim] with flag=foo then.
I'd try triggering [foo_anim] with flag=foo then.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: Help on animate_unit tag
That is possible to happen. The game does not recognize the unit id to animate the unit as well right after unstoring it.
If I were you, the first thing I would try was to spread the event, like unstore unit in a new turn [event], then animate the unit in a side turn [event].
Not so sure though.
If I were you, the first thing I would try was to spread the event, like unstore unit in a new turn [event], then animate the unit in a side turn [event].
Not so sure though.
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
- pyrophorus
- Posts: 533
- Joined: December 1st, 2010, 12:54 pm
Re: Help on animate_unit tag
Thanks for your replies,
Sorry, I made the modifications you suggested, but it doesn't work...
I'm sure the [animate_unit] don't work and I can't see why. The unit exists, as you can see, and the healing anim too (Elvish Shaman).
LS
Sorry, I made the modifications you suggested, but it doesn't work...
I'm sure the [animate_unit] don't work and I can't see why. The unit exists, as you can see, and the healing anim too (Elvish Shaman).
LS
HowTos: WML filtering, WML variables
Re: Help on animate_unit tag
Well, test whether the fact that you're triggering it in a side turn event and right after unstoring the unit has anything to do with it. Does it work in a simple moveto event, for example?
Re: Help on animate_unit tag
If nothing works, you can install another same unit (Elvish Shaman?) before unstoring Lestiviel with the same name (but different id, like "Lestiviel 2"), then animate it. After the healing animation, just [kill] her, then unstore real Lestiviel right after it on the same hex. This must work (although this is the final attempt).
In this case, you probably have to set variable the unit by depending on her level in post advance [event](s) previously.
The HP and EP does not show (I think) during the animation, so it won't be a problem.
In this case, you probably have to set variable the unit by depending on her level in post advance [event](s) previously.
The HP and EP does not show (I think) during the animation, so it won't be a problem.
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
Re: Help on animate_unit tag
Can you check your .sterr (or run wesnoth via terminal if you use mac/linux) to give us the exact error message?
- pyrophorus
- Posts: 533
- Joined: December 1st, 2010, 12:54 pm
Re: Help on animate_unit tag
Hi everybody !
Thanks for the great support (if professional software were supported like that, it would be fantastic !).
I tried everything and here are the conclusions:
- Skyone's solution is the only one which works with a regular animation (defend or healing).
- customs anims defined with [foo_anim], and flag=foo or flag=foo_anim don't work in any case.
- The situation is exactly the same in a moveto event (triggered by another unit of course).
I don't know if this is important but all events are embedded in a unit type declaration not directly in the scenario.
Sorry, I didn't try to run Wesnoth in terminal.
Cheers,
LS
Thanks for the great support (if professional software were supported like that, it would be fantastic !).
I tried everything and here are the conclusions:
- Skyone's solution is the only one which works with a regular animation (defend or healing).
- customs anims defined with [foo_anim], and flag=foo or flag=foo_anim don't work in any case.
- The situation is exactly the same in a moveto event (triggered by another unit of course).
I don't know if this is important but all events are embedded in a unit type declaration not directly in the scenario.
Sorry, I didn't try to run Wesnoth in terminal.
Cheers,
LS
HowTos: WML filtering, WML variables
Re: Help on animate_unit tag
For what it's worth, this works just fine for me:
And just to make sure: using arbitrary animation tag names like [foo_anim] has never been supported.
Code: Select all
[event]
name=moveto
first_time_only=no
[filter]
side=1
[/filter]
[animate_unit]
flag=healing
hits=yes
text="Reappearing !"
[filter]
x,y=$x1,$y1
[/filter]
with_bars=yes
[/animate_unit]
[/event]
Re: Help on animate_unit tag
What about [extra_anim]?zookeeper wrote:using arbitrary animation tag names like [foo_anim] has never been supported.
"What do you mean, "a dwarvish dragonguard with marksman is overpowered"?"
Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!
Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!
Re: Help on animate_unit tag
It works because it's not an arbitrary name.Reepurr wrote:What about [extra_anim]?zookeeper wrote:using arbitrary animation tag names like [foo_anim] has never been supported.
- pyrophorus
- Posts: 533
- Joined: December 1st, 2010, 12:54 pm
Re: Help on animate_unit tag
@zookeeper
... using a location filter instead of unit filter ? I probably try this to investigate.
Here, it's not easy to use because the unit disappears when attacked and shows again later, so other units can go on its original hex meanwhile. Using find_vacant=yes allow to find a free hex, but unit's coordinates are uncertain. I would have to store the unit again to get the final coordinates. Not very smart...
BTW, can you tell us more about [extra_anim] tag ? The wiki is rather silent about it.
... using a location filter instead of unit filter ? I probably try this to investigate.
Here, it's not easy to use because the unit disappears when attacked and shows again later, so other units can go on its original hex meanwhile. Using find_vacant=yes allow to find a free hex, but unit's coordinates are uncertain. I would have to store the unit again to get the final coordinates. Not very smart...
BTW, can you tell us more about [extra_anim] tag ? The wiki is rather silent about it.
HowTos: WML filtering, WML variables
Re: Help on animate_unit tag
Huh? x,y=$x1,$y1 is as much of a unit filter as id=Lestiviel is.pyrophorus wrote:@zookeeper
... using a location filter instead of unit filter ? I probably try this to investigate.
Not much to tell, and it should be easy enough to find out by trying.pyrophorus wrote:BTW, can you tell us more about [extra_anim] tag ? The wiki is rather silent about it.
If your unit has an animation like this:
Code: Select all
[extra_anim]
flag=myanim
...
Code: Select all
[animate_unit]
flag=myanim
....