Skip to content
User Avatar
#2959
Auto-translated
Jewill
How do you access a specific value in a linear array? For example, how do you access the 3rd hero using GetPlayerHeroes?
Also, just like with any other array with indices:
heroes = GetPlayerHeroes(1);
hero = heroes[3];
However, you need to keep in mind that in this function, the numbering starts from 0, i.e., to access the 3rd hero, you need to write heroes[2].
DarkLordax
I have a question regarding AdvMap. Is it possible to darken certain areas? I would like to implement something.
It's not entirely clear what you need. If you want to darken the lighting, it won't be possible to do it in specific areas; you can only change the global lighting using a script. For example, when crossing a region. If you're talking about the fog of war, it's not possible to darken already revealed areas. You can only prevent the revealing of new areas using the SetWarfogBehaviour function.