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 · NEXT»
Thanatoeil
Thanatoeil


Adventuring Hero
posted April 08, 2013 11:01 PM

H6 map editor - triggers - questions & answers

I open this thread so that H6-mapmakers can exchange about the triggers used in the H6-map editor.
I know that there are very few H6-mapmakers, but maybe it will help the courageous ones struggling with the editor and its triggers.

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


Adventuring Hero
posted April 08, 2013 11:05 PM

Territory with controlled access

I want to create an owned territory with several entrances. These entrances are only passable by heroes belonging to the player who controls the territory's fort.
But I did not find a simple way to make it.
Has anybody a solution ?

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


Supreme Hero
Bad-mannered
posted April 08, 2013 11:46 PM

Have u tried isOwnerOfEntity under conditions?
But then how do u make it passable/impassable.

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


Supreme Hero
Bad-mannered
posted April 09, 2013 12:06 PM

I want to recreate windmill/watermill.
Do you know how to make if any hero of a player interacts with a signpost something happens?

I tried making a script using IsDayOfWeek and when it is day 1 a variable gets a 0 value. Then I have to check if this variable = 0 when I visit the signpost. Interacting with the signpost gives 1000 gold and changes the variable to 1. In this way you can`t revisit the location until day 1 of next week when it is changed back to 0.

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


Adventuring Hero
posted April 09, 2013 06:39 PM
Edited by Thanatoeil at 18:41, 09 Apr 2013.

Any hero activates an entity

I think you can build something by combinating both condition triggers :
- EntityIsInLocation : to set an EntityVariable with the name of the hero stepping in the location surrounding the signpost
- EntityInteractedWithEntity : to test if the spotted hero activates the signpost.

It's only an idea, I didn't test it (I only successfully tested the EntityInteractedWithEntity condition).

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


Supreme Hero
Bad-mannered
posted April 09, 2013 07:07 PM
Edited by natalka at 19:59, 09 Apr 2013.

So the idea is to set entity variable which is assigned something whenever a hero enters the location. Can you write down this script only?
Anyway my biggest trouble is to "resupply" the watermill at the beginning of each new week. I am trying with IsDayOfWeek but it only triggers on day 1 week 1 and not on day 1 week 2 etc.

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


Adventuring Hero
posted April 09, 2013 11:55 PM
Edited by Thanatoeil at 23:56, 09 Apr 2013.

Any hero activates an entity

Here is the script testing if any hero activates an entity (signpost)

For my test I create a location (square 3 x 3) with the signpost in the middle.
The script works fine, but it is necessary to write one test per player.
And the size of the location must be adapted, so that no other hero can be in the area when the signpost is activated.

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


Adventuring Hero
posted April 10, 2013 12:07 AM
Edited by Thanatoeil at 00:08, 10 Apr 2013.

Counting the days

Quote:
Anyway my biggest trouble is to "resupply" the watermill at the beginning of each new week. I am trying with IsDayOfWeek but it only triggers on day 1 week 1 and not on day 1 week 2 etc.


I already searched for a function giving the number of the day. I found the function GetgameTime in the "obsolet" list. But I wasn't able to make it work, maybe it can't work.
So the only solution I see, is to create a variable that counts the days. Each time the player 1 turn begins, the counter is incremented. By this way, you create your own function that gives the day number.

But it's only an idea, I never wrote or tested it.

Nota : the lack of function that gives the day number is a proof that the map editor was not build for the fan map makers. UbiHole built only the triggers they needed in their maps/campaigns.

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


Supreme Hero
Bad-mannered
posted April 10, 2013 12:27 AM
Edited by natalka at 00:36, 10 Apr 2013.

I totally agree about the editor and ubisoft. I don`t know how to make increments to the variable.

I tested your  script but instead of placing glories I put addResource 10000 gold and nothing happens. Everything else is the same - signpost, getEntity. Do I have to assign a variable to getEntityinLocation

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


Adventuring Hero
posted April 10, 2013 12:47 AM
Edited by Thanatoeil at 00:47, 10 Apr 2013.

It is a bit late for me (past midnigt). I will give you more informations tomorrow.

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


Supreme Hero
Bad-mannered
posted April 10, 2013 11:28 AM

Can u show me how to remove starting army from a hero I buy in the tavern.

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


Adventuring Hero
posted April 10, 2013 06:36 PM

Any hero activates an entity

I made a small map containing only the "windmill" function (1 hero, 1 signpost, 1 location and the script).
The script works and gives 10000 gold.
I can send you this map. If you agree, we can use PM to organize the map exchange.

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


Supreme Hero
Bad-mannered
posted April 10, 2013 09:18 PM

check your hcm

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


Adventuring Hero
posted April 11, 2013 06:41 PM

Repeatability of triggers

(answering to natalka's question)

A trigger works only once : if a trigger is activated, it becomes disabled.
In order to make a trigger work repeatedly, it must be reactivated by using the function RestartTrigger.

Scenario_RestartTrigger :
parameters : the name of the trigger to be re-enabled, how long to wait before re-enabling the trigger (value in days)

Scenario_RestartTriggerMs :
parameters : the name of the trigger to be re-enabled, how long to wait before re-enabling the trigger (value in milliseconds)

@ natalka : I send you the updated map, including the RestartTrigger, allowing to activate the windmill repeatedly.

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


Adventuring Hero
posted April 11, 2013 11:55 PM

Recruiting hero without army

I think it's impossible to write such a script :
there are so many possibilities, that it is impossible to take into account all the cases.
For example :
1- a new hero is recruited when another hero is already in this town (garrison or visiting) : it is nearly impossible to know which one was recruited, which one was in town before,
2- a new hero is recruited in a town where creatures are in garrison, so all creatures (the hero's army and the garrison) are mixed and it is nearly impossible to knwo which creatures came with the new hero.

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


Supreme Hero
Bad-mannered
posted April 15, 2013 03:28 PM
Edited by natalka at 15:39, 15 Apr 2013.

I am aware of this. I will put a message in the loading screen
It will happen on second, third hero in one week. It will happen very rarely imo.

My latest script is about 7 "banks" being randomly placed on a circular template so each position has only one bank and according to the bank the creatures in the area are increased too. There are also 3 types of bank strength.

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


Adventuring Hero
posted April 15, 2013 09:42 PM

Recruiting hero without army

If you want to investigate, you can try the following triggers :
- (Condition) Scenario_IsPlayerBuyHero
- (Get Triggers) GetEntityInTownGarrison
- (Get Triggers) GetEntityInTownGarrison
- (Scenario) RemoveFullArmy

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


Adventuring Hero
posted April 15, 2013 10:25 PM

Calendar function

I wrote a script (Calendar) handling the day, week and month in game (this function doesn't exist among the UbiHole triggers) :


@natalka : if you want, I can send you the test map containing this script.

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


Supreme Hero
Bad-mannered
posted April 16, 2013 10:32 AM

recruiting hero without army - yes that`s exactly how I did it.
Can you send map with the calendar. My windmill doesn`t work properly :/

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


Adventuring Hero
posted April 16, 2013 09:59 PM

natalka, I just sent you the map.

 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 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0623 seconds