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

WML Workshop • Re: How to create recall list?

$
0
0
Is anyone could write me a code that will work for recalling unit? I dont know how to do it. Ive 3 human sides for which every side I need recall list. I guess this should be done in 2 events. First at the end of scenario to store units to recall list and second part of code to unstore units and delete them from recall list.
I'm sorry! I don't want to be those guys who just want to point out problems; I'm really having trouble trying to understand what you're saying.

I think I got it now; you want to recall all the units in the battle itself? :hmm:

You store the units on a 'victory' event (just to be safe). Just like you did, but on a 'victory' event.

Code:

[event]name=victory#blah blah blah... store store store...[endlevel]#blah blah blah[/endlevel][/event]
Then do the rest on a 'prestart' event. You can use the foreach; it's deprecated but... I think it has on your version.

Code:

[event]name=prestart{FOREACH first_side_recall_list i}            [recall]                id=$first_side_recall_list[$i].id            [/recall]        {NEXT i}        {CLEAR_VARIABLE first_side_recall_list}                {FOREACH second_side_recall_list i}            [recall]                id=$second_side_recall_list[$i].id            [/recall]        {NEXT i}        {CLEAR_VARIABLE second_side_recall_list}                {FOREACH third_side_recall_list i}            [recall]                id=$third_side_recall_list[$i].id            [/recall]        {NEXT i}        {CLEAR_VARIABLE third_side_recall_list}[/event]
I've never done this before, but it should work. I believe the units will be recalled around the initial area of each side. (This was done in the campaign A Song of Fire, scenario 15, Farewell)

Now... if this is not what you meant... sorry! :?

You don't need to store units for them to remain in the recall list; if it's a side controlled by AI, you must make the side persistent - otherwise it'll just be erased at the end of the scenario.

Statistics: Posted by Saizo-Luz — Today, 11:25 am



Viewing all articles
Browse latest Browse all 2138

Trending Articles