Search found 1187 matches

by white_haired_uncle
Yesterday, 1:17 pm
Forum: WML Workshop
Topic: [solved] where I can use [lua] and it's return value, what I can do in modify_unit
Replies: 12
Views: 353

Re: [solved] where I can use [lua] and it's return value, what I can do in modify_unit

So it looks like you can't do this either, which is unfortunate as I have multiple objects I'd like to insert. Why would you need to? You can dump multiple objects into [modify_unit anyway, so just put the [insert_tag] directly in there (like in your second example, but with name=object ). Using [i...
by white_haired_uncle
Yesterday, 5:00 am
Forum: WML Workshop
Topic: [solved] where I can use [lua] and it's return value, what I can do in modify_unit
Replies: 12
Views: 353

Re: [solved] where I can use [lua] and it's return value, what I can do in modify_unit

So it looks like you can't do this either, which is unfortunate as I have multiple objects I'd like to insert. #ifdef NONONO [modify_unit] [filter] id=$unit.id [/filter] [foreach] array=my_items [do] [insert_tag] name=object variable=this_item [/insert_tag] [/do] [/foreach] [/modify_unit] #endif Had...
by white_haired_uncle
April 21st, 2024, 3:12 pm
Forum: WML Workshop
Topic: [solved] where I can use [lua] and it's return value, what I can do in modify_unit
Replies: 12
Views: 353

Re: where I can use [lua] and it's return value, what I can do in modify_unit

Thank you. That clears up most, probably all of my confusion. For now, at least. Perhaps an option to do something with the return value of a non-conditional [lua] is worthwhile. It does not exist at this time however. It seems quite logical to me. If a [lua] block returns a valid WML tag, I would e...
by white_haired_uncle
April 20th, 2024, 6:40 pm
Forum: WML Workshop
Topic: [solved] where I can use [lua] and it's return value, what I can do in modify_unit
Replies: 12
Views: 353

Re: where I can use [lua] and it's return value, what I can do in modify_unit

P.S. while I'd still like to understand the above, keeping the [lua] outside [modify_unit], passing the return through a wml variable, and using [insert_tag] does work. ... wml.variables["my_item"] = item >> [/lua] [modify_unit] [filter] id=$unit.id [/filter] [insert_tag] name=object varia...
by white_haired_uncle
April 20th, 2024, 5:24 pm
Forum: WML Workshop
Topic: [solved] where I can use [lua] and it's return value, what I can do in modify_unit
Replies: 12
Views: 353

[solved] where I can use [lua] and it's return value, what I can do in modify_unit

This is similar to another thread where I was pointed to [insert_tag], which may be an alternative here, but I'd like to understand some things. I want to create an object in lua and feed that to [modify_unit]. I can create an object, and I can use [modify_unit] to add an object to a unit, but I can...
by white_haired_uncle
April 20th, 2024, 2:52 pm
Forum: WML Workshop
Topic: [closed] Merge unit animaions
Replies: 19
Views: 548

Re: [closed] Merge unit animaions

No, now that you mention it I think it's fine. What probably happened was I followed a link to AnimationWML#Frames so I didn't read the entire page from start to finish. Or I just skimmed past it. Maybe copy that "At any given time, an animation will display one frame for each frame prefix it c...
by white_haired_uncle
April 20th, 2024, 2:12 pm
Forum: Lua Labs
Topic: How to display two dialogs on each other
Replies: 5
Views: 187

Re: How to display two dialogs on each other

So your foreground/background canvas can't be another dialog? It may seem like a silly idea, but I had it and now the concept interests me. [EDIT: No, probably not. The wiki lists the things you can put "on" a canvas, and dialogs and arbitrary widgets and any other silly thing I can think ...
by white_haired_uncle
April 20th, 2024, 2:08 pm
Forum: WML Workshop
Topic: [closed] Merge unit animaions
Replies: 19
Views: 548

Re: Merge unit animaions

In the frames section , it clearly says this: Animation frames are defined using either the [frame] tag or a prefixed version of it, like [xxx_frame] . The xxx can be any sequence of alphanumeric characters. However, prefixes beginning with an underscore are reserve by the engine for internal use, ...
by white_haired_uncle
April 20th, 2024, 12:50 pm
Forum: WML Workshop
Topic: AI terrain affinity
Replies: 2
Views: 125

Re: AI terrain affinity

Thank you. I searched a couple of the AI pages for "terrain", I must have overlooked that one. That looks better than I had hoped.
by white_haired_uncle
April 20th, 2024, 12:20 pm
Forum: Lua Labs
Topic: How to display two dialogs on each other
Replies: 5
Views: 187

Re: How to display two dialogs on each other

I don't know if this will help, but I recently built an example of placing a label over another widget. I didn't have much luck with the fonts, and I don't know if this could be used to stack dialogs, but...

https://wiki.wesnoth.org/Sandbox/GUI/Ge ... d#Canvases
by white_haired_uncle
April 20th, 2024, 3:33 am
Forum: WML Workshop
Topic: AI terrain affinity
Replies: 2
Views: 125

AI terrain affinity

I'm creating fire elemental units. They will heal when over lava, and maybe get a damage bonus or something. I'd like to inform the AI that this unit should have an affinity for lava, but I'm not really finding anything. Best I can think of is to give the unit a good defense on unwalkable. Better id...
by white_haired_uncle
April 19th, 2024, 2:08 am
Forum: WML Workshop
Topic: [anitmation] conditionals
Replies: 5
Views: 201

Re: [anitmation] conditionals

The primary unit is always the unit being animated, and it's the attack that the unit being animated is using. So for example, in a defend animation, the primary unit is the unit being targeted, and in an attack animation, it's the unit currently attacking. Or to phrase it much more simply, it's al...
by white_haired_uncle
April 18th, 2024, 9:21 pm
Forum: WML Workshop
Topic: [anitmation] conditionals
Replies: 5
Views: 201

Re: [anitmation] conditionals

Thanks. Looking at that got me thinking that I don't necessarily need to concentrate on [death], since if my unit hits on offense he's going to die. I'd still like to get the filters working (special_id_active I think on attack) just to understand them. Defense is a bit harder. I'm not sure what [de...