How to get rancom unit type from recruitment list?
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.
How to get rancom unit type from recruitment list?
I'm trying to make ability, that recruits random unit from side recruitment list.
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?
Code: Select all
[store_side]
[filter]
side=$side_number
[/filter]
variable=rec_side
[/store_side]
Re: How to get rancom unit type from recruitment list?
Split $rec_side.recruit to array. https://wiki.wesnoth.org/InternalAction ... bles-split