How to get rancom unit type from recruitment list?

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
tadzix2k
Posts: 2
Joined: August 4th, 2019, 8:16 pm

How to get rancom unit type from recruitment list?

Post by tadzix2k »

I'm trying to make ability, that recruits random unit from side recruitment list.

Code: Select all

        [store_side]
            [filter]
                side=$side_number
            [/filter]
            variable=rec_side
        [/store_side]
I decided to do this by picking random number base on length of $rec_side.recruit array, however there's one problem: when I try to get $rec_side.recruit.length, the value is 0. Is there anything I can do to solve this problem?
User avatar
Ravana
Forum Moderator
Posts: 3313
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: How to get rancom unit type from recruitment list?

Post by Ravana »

tadzix2k
Posts: 2
Joined: August 4th, 2019, 8:16 pm

Re: How to get rancom unit type from recruitment list?

Post by tadzix2k »

Thanks
Post Reply