Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 5 - Modders Workshop > Thread: How to link combat arenas to map buildings
Thread: How to link combat arenas to map buildings
Sylannh
Sylannh

Tavern Dweller
Spinner of fates
posted December 26, 2021 01:03 PM

How to link combat arenas to map buildings

Everything's in the title : I'd like to link a specific combat arena to a specific map building.

Example : Linking the duel map "Abyss" to the "Blood temple" map building.

Does anyone know how to do that ? (I'd really like to avoid scripts, but I guess I won't be able to do so...)

Thanks

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dredknight
dredknight


Honorable
Supreme Hero
disrupting the moding industry
posted December 27, 2021 11:24 AM

You cant do it without LUA scripts.
This is the command:

StartCombat(heroName, enemyHeroName, enemyHeroName, creaturesCount, creatureType[1], creatureAmount[1],,creatureType[Count] ,creatureAmount[Count],combatScriptName, combatFinishTrigger, arenaName, allowQuickCombat );

Here is an example from the MMH55 scripts.
StartCombat(hero,nil,6,t01a,cntcr,t01a,cntcr,t01b,cntcr,t01b,cntcr,t01a,cntcr,t01b,cntcr,nil,"H55_ObeliskWin","/Arenas/CombatArena/FinalCombat/Bank_Void.(AdvMapTownCombat).xdb#xpointer(/AdvMapTownCombat)",1);

Where H55_ObeliskWin is a function that is executed if the player wins a combat so you can give treasures or do custom stuff.
____________
Join our official discord channel | NCF Utility Beta

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Sylannh
Sylannh

Tavern Dweller
Spinner of fates
posted December 28, 2021 07:01 PM

So if I understand, this script would only work one building/map at a time. In that case, I won't go further... my idea was to make this "universal", so that every map containing the building would automatically get the appropriate combat arena I want. :/

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dredknight
dredknight


Honorable
Supreme Hero
disrupting the moding industry
posted December 29, 2021 09:12 PM

It is possible to make it global.
What you need to do is make a script that launches at the start of the map.
It will search for all buildings of specific type and override the default trigger event with custom one. That custom event will be the launch of the custom combat battlefield.

____________
Join our official discord channel | NCF Utility Beta

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll Post New Topic Post New Reply

Page compiled in 0.0198 seconds