Recalling via WML

The place to post your WML questions and answers.

Moderator: Forum Moderators

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
s1m0n
Posts: 53
Joined: May 7th, 2020, 1:55 pm
Location: Irdya

Recalling via WML

Post by s1m0n »

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
eh, what comes here again?
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

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
s1m0n
Posts: 53
Joined: May 7th, 2020, 1:55 pm
Location: Irdya

Re: Recalling via WML

Post by s1m0n »

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
eh, what comes here again?
User avatar
s1m0n
Posts: 53
Joined: May 7th, 2020, 1:55 pm
Location: Irdya

Re: Recalling via WML

Post by s1m0n »

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?
eh, what comes here again?
User avatar
beetlenaut
Developer
Posts: 2824
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
s1m0n
Posts: 53
Joined: May 7th, 2020, 1:55 pm
Location: Irdya

Re: Recalling via WML

Post by s1m0n »

I posted it in a different thread...
Turns out, I just used the [leader] tag in a wrong way
eh, what comes here again?
Post Reply