Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 1439

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

$
0
0
So it looks like you can't do this either, which is unfortunate as I have multiple objects I'd like to insert.

Code:

#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 to move the [modify_unit] inside the [foreach] of course.

Actually, I wonder if I was really careful crafting my array maybe I could get away with just one [modify_unit]:

Code:

        [modify_unit]             [filter]                 id=$unit.id             [/filter]             [insert_tag]                 name=insert_tag                variable=surely_youre_not_serious...
I don't think I'll try that.

Statistics: Posted by white_haired_uncle — 22 minutes ago



Viewing all articles
Browse latest Browse all 1439

Trending Articles