Allow hero to be a leader

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
rogul
Posts: 34
Joined: May 25th, 2015, 12:48 am

Allow hero to be a leader

Post by rogul »

I have a hero in one scenario that I am attempting to make the leader for the next scenario.

I thought I could use save_id of the side to track the two leaders until they join up later, but can't get the hero to be carried over.

In S1, I create a hidden side and when hero moves to a location, switch them to that side, set canrecruit=yes then [put_to_recall_list] - using inspect this works and they are shown in recall list at end of scenario.

S2 starts with the hidden side as the side 1, but the recall list is empty so it doesn't find the leader.

S1 side

Code: Select all

[side]
	side=6
	controller=human
	save_id=side_Ruadredar
	hidden=yes
[/side]
S2 side

Code: Select all

 [side]
	side=1
        controller=human
	save_id=side_Ruadredar
	recruit="Elvish Archer, Elvish Fighter, Elvish Scout, Elvish Shaman"
        {GOLD 500 400 300} 
        {INCOME 2 2 2}
        team_name=elven
        user_team_name=_"Elven"
	type=Elvish Fighter
[/side]
I put type=Elvish Fighter so it would have a unit and not give instant defeat, reading the wiki suggested that it would pull the leader from the recall list, but with no units in the recall list this isn't happening.

Am I mis-interpreting the sideWML functions, or just doing something wrong?
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
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: Allow hero to be a leader

Post by Lord-Knightmare »

Instead of this extra side and recall list thing, I find it more convenient to store the hero in a var and then carry it over to the next scenario and then unstore, with the proper modifications of course.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Post Reply