Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
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)"