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 > MapHaven Guild > Thread: H6 map editor - triggers - questions & answers
Thread: H6 map editor - triggers - questions & answers This thread is 3 pages long: 1 2 3 · «PREV
niven
niven


Hired Hero
Lord Niven(cz)
posted June 16, 2013 05:33 PM

The boss is a total shame that it does not. And does anyone know how to cutscene editor? This is already the last thing in the editor still can not.

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


Adventuring Hero
posted June 19, 2013 09:05 PM

niven, I never tried to use the cutscene editor, so I cannot give you any help about it.

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


Hired Hero
Lord Niven(cz)
posted June 20, 2013 04:44 PM

Never mind. Efforts are also appreciated. As for the campaign, and is likely to be translated into English. So then you take her too.

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


Supreme Hero
Bad-mannered
posted June 30, 2013 04:40 PM

Thanatoeil, I uploaded my map on maps4heroes website.
http://www.maps4heroes.com/forum/opinions.php?map_id=53&game=6

Can you see it and help me make the tavern script work for both towns?

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


Adventuring Hero
posted July 01, 2013 09:20 PM

natalka,
I already downloaded your map (on june 28th).
I will have a look on it ; but you will have to be patient, as I don't work very often with the map editor.

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


Supreme Hero
Bad-mannered
posted July 02, 2013 09:42 AM

ok I am no hurry

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


Adventuring Hero
posted July 08, 2013 12:32 AM

natalka,
I sent you a detailed answer by mail.

About your map : it contains a lot of scripts (you made an impressive work). These scripts can be read to understand how H6-scripting works and be used as examples.

An alternative way to limit hero recruiting can be the use of the function "Scenario_SetGUIElement" : I think it allows to disable the "recruit hero"-button.

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


Supreme Hero
Bad-mannered
posted July 12, 2013 07:01 AM

Thanatoeil, I know how I can crash the game with a script. I can't seem to find the script Toggle_hero ability ref . If it gets skill from hero I 'd be able to ban certain skills.

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


Adventuring Hero
posted July 14, 2013 05:27 PM

natalka,
I'm note sure to understand what you wrote : do you want to disable some hero's skills ?

I made some tests : I wasn't able to make "Toggle_HeroAbilltyRef" work.

About skills, I use the trigger "Scenario_SetSkill" with "ability" selected in the lists "PassiveAdventureAbilities" or "PassiveCombatAbilities".

I found a function that works (to disable skills) : Scenario_LockElement. But it disables a whole set of skills. For example, "AbilityTreeParagon" disables the first set of might skills.

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


Supreme Hero
Bad-mannered
posted July 15, 2013 08:08 AM

I can`t "read" what skill the hero levels up ..toggle_heroabilityref really doesn`t work

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


Adventuring Hero
posted July 18, 2013 11:50 PM
Edited by Thanatoeil at 23:52, 18 Jul 2013.

Controling the tile passability

I found a way to have a tile passable for a player and not passable for the others.

1- Place a unit on a tile,
2- Make that this unit belongs to player A (either with the EntityProperties window or with the trigger "Scenario_SetOwner")
3- Disable the unit with the trigger "Scenario_SetEntityDisabled"

Result :
a- as the unit belongs to player A, all player A's heroes can pass through the unit
b- as the unit is ennemy to all other players, their heroes cannot pass through it. And as the unit is disabled , the ennemy heroes cannot start a fight against the unit.

It works for human players and AI players.

These two properties extend to the 9 tiles surrounding the unit.

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


Supreme Hero
Bad-mannered
posted August 02, 2013 10:43 AM

Thanatoeil, do you think it is possible to create a random map template like for example h3 templates - jebus, balance..etc?

You must use map locations all over the place and it will be script heavy.

Only problem is that the terrain will always be the same. Maybe design  3-4 terrains on a map and you get to play on one terrain and can`t go to other terrains. You have to design a very big map. Only 4 different terrain layouts but better than a fixed map

Do you think there are other obstacles?

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


Adventuring Hero
posted August 03, 2013 10:39 AM

natalka said:
Thanatoeil, do you think it is possible to create a random map template ?


I would say that it is theorically possible.
But it will represent a gigantic work, with a lot of gray areas :
- the passability is hard to control ; some places could be unreachable.
- all the bugs and the unknown functions of the editor will make it hard
- scripting will be huge : this makes checking and errors fixing very complicated,

Conclusion : I think it is better to spend time to build a customized map than to create a full randomized map.

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


Adventuring Hero
posted August 11, 2013 11:17 AM

Good news : for once, Ubituos fixed something in the map editor.

I noticed, in the map editor 2.1.1, that the trigger "GetEntityInTownVisiting" works now.

So, it's now possible to know the names of all the heroes in town (with "GetEntityInTownGarrison" and "GetEntityInTownVisiting"). This means that it is possible to know the name of the newly recruited hero, even if another hero is already in town.

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


Supreme Hero
Bad-mannered
posted August 11, 2013 07:49 PM

Is it possible to remove the army of an exact hero?

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


Adventuring Hero
posted August 13, 2013 11:10 AM

Heroes handling

To handle the heroes, I use the following way :

I save the hero entity name in entity variables :
- h0 for the faction hero
- h1 for the 1st recruited hero
- h2 for the 2nd recruited hero
- ....
I stop at h9, as the 10th hero costs at least 500 000 gold to recruit.

To identify all the heroes from one player, I give each of them a quest item ; quest items cannot be given or be sold, so the hero must keep it. Even if the hero is killed in a combat against neutral creature, he keeps the quest item.
If the hero is defeated by an enemy hero, he loses the quest item. But the daily script (see #1) give him the quest item back while he is still to be resurrected in the hall of heroes

List of scripts :


> On game start
set entity variable : h0 = faction hero

> Event trigger

#1(daily) remove the quest items from all heroes (all players) : Scenario_RemoveArtifactsFromPlayer
         give the quest item to all listed heroes : for h0 to h9, Scenario_GiveItem

#2(on recruit) if a new hero is recruited, add him to the list and give him the quest item
condition : IsPlayerBuyHero
check for each town owned by the player
- is a hero in garrison (GetEntityInTownGarrison is different from ScenarioEntity Nothing) ; if this hero has no quest item, this means this hero is the recruited hero
- is a hero in visit (GetEntityInTownVisiting is different from ScenarioEntity Nothing) ; if this hero has no quest item, this means this hero is the recruited hero
Take the name of the recruited hero (SetEntityVariable new_hero to GetEntityInTown....) and launch the script setting the first free hero variable (h1 to h9) with new_hero.

So, Natalka, if you use something like this you can handle all the heroes on map and remove the army of the hero you want.

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


Supreme Hero
Bad-mannered
posted August 14, 2013 10:37 AM

But still if there are creatures in the town garrison they will be removed too..or no?

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


Adventuring Hero
posted August 14, 2013 06:58 PM

Yes, they will be removed.
I don't know any function that remove hero's army before he is hired.
And if there are creatures in the garrison slot, as soon as a hero is hired, garrison creatures and hero creatures are mixed, and it is no more possible to sort them.

I was thinking about another solution, unfortunately it's a very complicated solution.
The idea is : if there is any creature in the garrison slot, then hero cannot be hired.
But there is no direct function to obtain this result :
- IsTownTabOpened / HallOfHeroes (test if the hero hiring is open)
- if GetNumberOfCreatureInArmy (from Entity "the chosen town") is not equal to 0
>>>1st problem : this condition works with a kind of unit ; this means all type of units (sentinel, sister, crossbowman,............) have to be tested.
-- then ... 2nd problem : I found only one way to prevent hero to be hired, by quitting the town screen.
The function Scenario_OpenQuestWindow open the quest window, and thus make you quit the town window.

But if you find a simpler way to obtain this result, maybe it can help you.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 3 pages long: 1 2 3 · «PREV
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0329 seconds