One side, multiple leaders, seperate recruits

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.
User avatar
DDR
Posts: 558
Joined: March 23rd, 2007, 4:56 pm
Location: Vancouver, Canada
Contact:

Post by DDR »

Go with the right-click method. You will have to put in the recruits manually, but you can do it fairly simply.

Code: Select all

    [event]
        name=start
        [set_menu_item]
            id=recruit
            description= _ "Recruit Special"
            [command]
                [message]

speaker=narrator
message= _ "Pick a unit to recruit..."
[option]
message= _ "Merman Hunter"
[command]
[unit]
type=Merman Hunter
x,y=$x1,$y1
[/unit]
[gold]
amount=-16
side=$side_number
[/gold]
[/command]
[/option]
[option]
message= _ "Merman Fighter"
[command]
[unit]
type=Merman Fighter
x,y=$x1,$y1
[/unit]
[gold]
amount=-15
side=$side_number
[/gold]
[/command]
[/option]

                [/message]
            [/command]
        [/set_menu_item]
    [/event]
This code should give a simple unit recruit dialog. I have not filtered it, however... :?

:arrow: I have not tested this code yet, but it should work.
Clonkinator
Posts: 676
Joined: July 20th, 2006, 4:45 pm
Location: Germany

Post by Clonkinator »

But you don't even show the player how many gold he has to spend to recruit these units... :?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

As I said, you can do that, but it'll look and feel like crap when one of your leaders gets a normal recruit dialog and the other one gets some [message] substitution.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

It's possible, and should be (fairly) easy, if you're willing to ignore the corner case of having both leaders on a keep at the same time. If you're not, well, it gets rather more difficult...
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
Beastss
Posts: 15
Joined: December 23rd, 2007, 9:57 am

Post by Beastss »

Wouldn't it just be easier to make it so that there is like some sort of shop-like event in the castle/keep so that those units can 'recruit'?
Post Reply