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.
Code:
... wml.variables["my_item"] = item >> [/lua] [modify_unit] [filter] id=$unit.id [/filter] [insert_tag] name=object variable=my_item [/insert_tag][/modify_unit]
Statistics: Posted by white_haired_uncle — Yesterday, 6:40 pm