Problem with custom recruiting

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
Xardas666
Posts: 31
Joined: March 10th, 2021, 7:12 pm

Problem with custom recruiting

Post by Xardas666 »

Hello. I have created macro for custom recruiting pattern. It should work that I'm recruiting 3xlvl1, 2xlvl2, 1xlvl3 units. It's broken. For example when I recruit 3 lvl1 paladins and then recruit any other unit the paladins disappear from recruit list. Can anyone tell me how to fix it please?
Spoiler:
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

Re: Problem with custom recruiting

Post by vghetto »

Replace [set_extra_recruit] with [allow_extra_recruit]. See if that helps.
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2359
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Problem with custom recruiting

Post by Lord-Knightmare »

According to your posted code, I think that's exactly what will happen. You recruited 3 level 1s and after that the recruit disappears from the list. You did not add any code at all to restore the recruitlist after the number {NUMBER} have been met. As in no [allow_recruit] code is present here.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
Xardas666
Posts: 31
Joined: March 10th, 2021, 7:12 pm

Re: Problem with custom recruiting

Post by Xardas666 »

vghetto wrote: December 20th, 2021, 8:41 pm Replace [set_extra_recruit] with [allow_extra_recruit]. See if that helps.
Yes. It's working now. Thanks!
Post Reply