Recalling via WML

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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.
Post Reply
User avatar
s1m0n1nl33t
Posts: 18
Joined: May 7th, 2020, 1:55 pm

Recalling via WML

Post by s1m0n1nl33t »

Hello,
I want to make a scenario within a campaign where the player starts without a castle, but his whole recall list is already recalled and there. Any ideas how to use the [recall] tag for this? I've tried:

Code: Select all

[recall]
    side=1
    [filter]
        race=human
    [/filter]
[/recall]
and some other variations of this with and without the filter, but none of these seem to work.
Can anyone help me?

c0nfus3d1nl33t
s1m0n1nl33t

User avatar
octalot
Developer
Posts: 480
Joined: July 17th, 2010, 7:40 pm

Re: Recalling via WML

Post by octalot »

Each [recall] recalls one unit, even if the filter matches multiple units.

Sceptre of Fire's final scenario has the code that you need:

Code: Select all

        [store_unit]
            [filter]
                side=1
                x,y=recall,recall
            [/filter]

            kill=no
            variable=to_be_recalled
        [/store_unit]

        [foreach]
            array=to_be_recalled
            [do]
                [recall]
                    id=$this_item.id
                [/recall]
            [/do]
        [/foreach]

        {CLEAR_VARIABLE to_be_recalled}

User avatar
s1m0n1nl33t
Posts: 18
Joined: May 7th, 2020, 1:55 pm

Re: Recalling via WML

Post by s1m0n1nl33t »

Thank you!
I knew I've seen such a feature before, but didn't know where, and I didn't want to search all campaigns for this.

s1m0n
s1m0n1nl33t

User avatar
s1m0n1nl33t
Posts: 18
Joined: May 7th, 2020, 1:55 pm

Re: Recalling via WML

Post by s1m0n1nl33t »

Now I have another problem: I can't recall in general because either my recall list doesn't get transferred to the next scenario or the units (I have tested this with every unit from level 4 to level 0) don't even get moved to the recall list. Any macro or something I've possibly overlooked?
s1m0n1nl33t

User avatar
beetlenaut
Developer
Posts: 2475
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Recalling via WML

Post by beetlenaut »

No...it should be automatic if the leader is the same. You didn't give us enough information for us to help you though. If you still haven't figured it out, you should post your code. For the fastest results, just post the whole campaign as a zip file.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide

User avatar
s1m0n1nl33t
Posts: 18
Joined: May 7th, 2020, 1:55 pm

Re: Recalling via WML

Post by s1m0n1nl33t »

I posted it in a different thread...
Turns out, I just used the [leader] tag in a wrong way
s1m0n1nl33t

Post Reply