Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 1164

WML Workshop • How to get rancom unit type from recruitment list?

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

Code:

        [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?

Statistics: Posted by tadzix2k — Yesterday, 6:49 pm



Viewing all articles
Browse latest Browse all 1164

Trending Articles