Connection ErrorBad RequestSession 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.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Hello everyone. I decided to reminisce about my childhood and play around with the Heroes 5 map editor. The map is pinned in the message. I tried to implement an update for the quest status, but for some reason, it doesn't work. P.S. Yes, all the names in the script refer to real in-game objects and map files.
function f() MessageBox ("/Maps/SingleMissions/FunnyFantasy/Rumour.txt"); SetObjectiveState("Q", OBJECTIVE_COMPLETED) end
function f1() MessageBox ("/Maps/SingleMissions/FunnyFantasy/Rumour.txt"); end
To patch the EXE get Deflaktor's tool from here. The page also includes how-to-use guide.
The patch works for both - original ToTe and Quantomas EXE files.
Gerter
Oh, it's really great! So many new ideas to realize
Нет войне.
dredknight
Thank you @Gerter,
Actually I am getting into scripting as well. I see there is a lot of progress made by the community! I was wondering if you have any list with Combat script functions?
There are some in "Editor Documentation\HOMM5_A2_Script_Functions.pdf" but from what I could find around here there are so many more which are undocumented. Any tips, lessons and links will be appreciated!
Gerter
Auto-translated
I patched my EXE and tested it in hot-seat – it works! So, it's like a breath of fresh air for mods like NHF or NAF – we can add so many new features now! Big thanks to you!
@dredknight – there's a good tutorial from Novik – https://yadi.sk/i/9xfu8mh0Acq0kg. It's in Russian, but it's the best tutorial for combat functions, and it has all the functions available in combat mode.
But maybe now it's time to make a more complex tutorial about combat functions... I use lots of combat scripts in my maps, so maybe I can do it if it will be useful.
Нет войне.
dredknight
Thank you I will look at the tutorial tonight.
I learn fast from examples, so if you have any work I can observe that will be helpful too!
Cheers!
Gerter
i got a lot of experience from RedHeavenHero's scripts, so now i use many of his ideas in my own maps. Look at his works: /topic/11060/, /topic/13208/ and mb my map too - /topic/14423/. Also i can help you in PM if tou want
Нет войне.
dredknight
Thank you I will definitely get back to you :).
OrnsteinDragonslayer
Auto-translated
A million-dollar question! The scripts aren't working. Can you tell me where the error is? The console isn't showing any errors. First: if player 2 captures the elf city, you should lose, but the game continues.
function CheckAnpossal() if GetObjectOwner ('houseElf') == 2 then sleep(10) SetObjectiveState('q4', OBJECTIVE_FAILED, 1); sleep(10) Loose() end end
startThread (CheckAnpossal)
Second: during the game, it checks if a unit in the hero's army has died. If the hero doesn't have it, you lose. This works. But after a certain point in the plot, this unit should be removed from the army, and the game should continue. It doesn't continue – you lose. The console doesn't seem to be showing any errors either.
Tracking the unit in the hero's army (works):
function lostDragon() ---- Checking for the loss of the dragon while 1 do sleep ( 10 ); if GetHeroCreatures("Ohtarig", 83) == 0 and dragon == 1 then if SetRegionBlocked('CheckAstrid', false) then SetObjectiveState("q5", OBJECTIVE_FAILED, 1); sleep ( 10 ); Loose(); break end; end; end; end startThread (lostDragon)
First: if player 2 captures the Elven town, you must lose, but the game continues.
You forgot, you only have one check there.
It doesn't continue - you lose.
And are the settings for quest q5 correct? Maybe it initiates the loss itself. It would also be good to make it so that the lostDragon function exits the loop when dragon==0, so there are no constant, meaningless checks.
And are the quest settings for q5 correct? Maybe it's initiating the loss on its own. It would also be good to make it so that the lostDragon function exits the loop when dragon==0, so there are no constant, pointless checks.
Indeed, now that the Hive city has been captured, the quest fails, and the game is lost. But I still haven't solved the other problem. The q5 quest is correct in the editor, and the kind_manual is in the conditions; I don't think the root of the problem is there. And how do I stop this loop? I've made a few minor edits to this function in the hope of fixing it, but it still fails. Just in case, I'll post it again so you don't have to look for it.
SetRegionBlocked ('CheckAstrid', true)
function lostDragon() ---- Check for dragon loss while 1 do sleep ( 10 ); if GetHeroCreatures("Ohtarig", 83) == 0 and dragon == 1 and SetRegionBlocked('CheckAstrid', false) then SetObjectiveState("q5", OBJECTIVE_FAILED, 1); sleep ( 10 ); Loose(); break end; end; end; startThread (lostDragon)
And, essentially, at the moment when the dragon should disappear from the army, the quest to save it should fail, but the game should continue.
Check the 'q5' task setting, specifically the CanUncomplete option. It seems it needs to be set to true to prevent a loss upon failure.
and SetRegionBlocked('CheckAstrid', false)
I don't quite understand the purpose of this check. It will always be 1 if the region exists.
Indeed, it was set to false, and I've changed it to true. However, this didn't solve the problem. Here's what the console says at that moment (EWA is installed, by the way). Regarding the region check, I've given up and implemented some kind of crude workaround to change it along with the coefficient, but it seems to be useless.
Help a newbie with a script.
```
function MakeHeroes()
DeployReserveHero("Mardigo", 17, 161, 0);
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "Start", "MakeHeroes");
function podkrep()
MessageBox(You discovered a detachment of allied rebels who destroyed a border town.);
MoveCamera(28, 148, 0, 50, 0, 0, 1, 1);
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "gorod", "podkrep");
```
What should the script do?
1. When entering a specific location, it spawns Laslo.
2. When entering a specific location, it displays a message box stating that you found reinforcements, and the camera smoothly flies to the specified coordinates.
The script throws an error in the game.