Auto-translated
It works perfectly for me with CombatScript inside, and in maps like Mercenaries or Cursed, which I looked at, too 🧐
And please don't tell me that you just repeated all the actions from here => https://forum.heroesworld.ru/showpost.ph ... ount=897
I hope you didn't touch any combat-common.lua files? Because JonnyP's method does work, but there is a simpler option, so we can forget about the option of changing the default script altogether.
```lua
function ReturnHeroScript(hero)
if hero == "Hero Name" then
SetHeroCombatScript(hero, "path to script")
end
end
for i=1, 8 do
if GetPlayerState(i)==PLAYER_ACTIVE then
Trigger(PLAYER_ADD_HERO_TRIGGER, "ReturnHeroScript")
end
end
```
This script simply reassigns the combat script to the hero if he is hired again. Convenient? Yes, it is.
As for the reason for moving the combat script outside the map archive:
The player created the script in Maps/SingleMissions/MapName/, but stubbornly wrote only "/CombatScript.xdb#xpointer(/Script)".
So RedHeavenHero advised him to put the script file correctly, in the root directory. Or he could have just written "/Maps/SingleMissions/MapName/CombatScript.xdb#xpointer(/Script)"
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________