|
Thread: How to link combat arenas to map buildings | |
|
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
|
|
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
|
|
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. :/
|
|
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
|
|
|
|