Hello. In the "Treasure Hunters" map, there is a non-playable faction - Inferno, and also a starting hero that cannot be changed. How can I do the same for my map?
Go to the map settings (Map Properties), then to the player settings (Players Properties). In the Player line, select the player you need. In Main Hero, select the hero that cannot be changed. If you want the hero to be selectable when choosing the map, you need to select Main Town and then check the Generate Hero In Town box (I think GHIT doesn't work on SingleMission maps, only Multiplayer). To prevent playing as this player (or, as you wrote, the race), uncheck the Human Playable box for the player you want.
Added 20 minutes later
Hello! I have a question: How can I write a script that will track who I am fighting?
I need my hero to have "bad consequences" with a specific race, i.e., when I engage them in combat, I receive +1 to a "bad" counter for being a rebel and daring to raise my crossbow and sword against them. And I would also like to clarify about the comparison variable (if I named it correctly) "~=", what result does it give? For example, "if GetDifficulty() ~= DIFFICULTY_EASY then". I just don't quite understand how to use it correctly.
And finally, what I'm interested in: Can I place arena walls with gates on the map? Is there a way to animate them so that the gates open and close?