Search found 35 matches

by blasphymer
February 6th, 2011, 5:59 pm
Forum: WML Workshop
Topic: Creating a macro to replace the leader once he dies?
Replies: 23
Views: 1361

Re: Creating a macro to replace the leader once he dies?

Ceres: I thought the {VARIABLE_OP replacement_index rand "0..$($replacements.length - 1)"} narrowed that down into one unit in the replacements variable? I could be wrong, but thats what I have gotten thus far from Sapient and zookeeper.
by blasphymer
February 6th, 2011, 5:40 pm
Forum: WML Workshop
Topic: Creating a macro to replace the leader once he dies?
Replies: 23
Views: 1361

Re: Creating a macro to replace the leader once he dies?

Okay, I will create a test scenario with which to test it out and play around with the code. Just so I understand correctly, in order to to modify the unit once it has been selected from the variable, I would:

Code: Select all

{ADVANCE_UNIT $replacements new leader}
Where "new leader" is the leader type, correct?
by blasphymer
February 6th, 2011, 4:00 pm
Forum: WML Workshop
Topic: Creating a macro to replace the leader once he dies?
Replies: 23
Views: 1361

Re: Creating a macro to replace the leader once he dies?

Humonculus: Yes, I know a bit about variable usage in WML, as the wiki has been open on one of my computers for quite a while... and the others in this house absolutely hate me for it... As for the exact mechanics, yes, the old leader dies, but just before he does, the last unit is advanced to his u...
by blasphymer
February 6th, 2011, 3:16 am
Forum: WML Workshop
Topic: Creating a macro to replace the leader once he dies?
Replies: 23
Views: 1361

Re: Creating a macro to replace the leader once he dies?

Thanks for the quick reply homunculus! I'll be the first to admit, I have not tried variables in WML very much, if they are anything like in C# or python, that should suffice... :geek: On the other hand, I decided to quickly write my macro and present it here, so that my problem will be easier to so...
by blasphymer
February 6th, 2011, 1:10 am
Forum: WML Workshop
Topic: Creating a macro to replace the leader once he dies?
Replies: 23
Views: 1361

Creating a macro to replace the leader once he dies?

I have searched for one in the mainline campaigns and *some* of the UMC, but as of yet have not found what I am looking for completely... Same with the forums, so here is my quandary. I have started the momentous task of developing a campaign. :wink: I know for sure that I want to (in later scenario...