_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
New here? I'm Roha — want a quick tour?
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.
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?
function Start()
--We only consider the case when our hero attacks; if the "bad counter" increased when we were attacked, that would be unfair.
local EnemyCreat = GetDefenderCreatures()
flag = 1
for key, unit in EnemyCreat do
if GetCreatureType(unit)=="Bad ID" or GetCreatureType(unit)=="Bad ID 2" then --N blocks of "bad ID" checks
SetGameVar("BadCounter", GetGameVar("BadCounter")+1)
flag = nil
break
end
end
if flag then
SetGameVar("GoodCounter", GetGameVar("GoodCounter")+1)
end
end
Create a new script (xdb and lua) and link it to your hero using the function SetHeroCombatScript("Hero Name", "/Path to script/ScriptName.xdb#xpointer(/Script)")
In the combat script itself:function Start()
--We only consider the case when our hero attacks; if the "bad counter" increased when we were attacked, it would be unfair.
local EnemyCreat = GetDefenderCreatures()
flag = 1
for key, unit in EnemyCreat do
if GetCreatureType(unit)=="Bad ID" or GetCreatureType(unit)=="Bad ID 2" then --N blocks of "bad ID" checks
SetGameVar("BadCounter", GetGameVar("BadCounter")+1)
flag = nil
break
end
end
if flag then
SetGameVar("GoodCounter", GetGameVar("GoodCounter")+1)
end
end
Good day. This question has probably been discussed before, but I don't have the energy to scroll through more than 300 pages of the forum. Please tell me:
The GSC creates mountains and other objects. How do I remove the orange surface underneath them? (It's visible when the Show All Passability button is pressed). The hero cannot move across this surface, and you cannot place buildings/dwellings (or rather, you can, but the entrance must be outside the orange zone). I really want to remove some of the randomly placed mountains and place a Dragon Utopia, etc. None of the tabs like PLATEAU, + - level (raise), lower (dig), smooth (smith), level (zero), eraser help. There must be a simple way.