Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
In reply to Kehich
14 years ago
Auto-translated
Kehich
It's very strange, because I'm comparing this water to the water I saw in one of the campaigns. That water is just water; it looks like a normal body of water, but this water looks like a dug-out channel (you can see the ground beneath it; I can create a path along its bottom). Is this all that can be achieved in the editor?


There are three options (as far as I know):

a) Create a body of water with transparent water and a visible bottom;
b) Create a body of water with an invisible bottom (like a sea);
c) Place a crater on the map and fill it with water (the bottom is not visible, but it looks beautiful).

From your questions, it's not entirely clear what task you want to solve?
User Avatar
14 years ago
Auto-translated
Yeah, that's right, the seawater has a clearly visible bottom, while you can't see the bottom of the river water. I usually pour river water on top of the seawater.
 

К А
Стикеры GBF в Telegram
In reply to antonag07
14 years ago
Auto-translated
antonag07
There are three options (from what I know) -

a) create a body of water with transparent water and a visible bottom;
b) create a body of water with an invisible bottom (like a sea);
c) place a crater on the map and fill it with water (the bottom is not visible - but it looks beautiful).

From your questions, it's not quite clear what task you want to solve?
I choose option b:) I specifically wanted a body of water with an invisible bottom. If you want an example, check the campaign in HoMM V for the Elves, the mission where Faidaen searches for Tieru across the seas - that's where the sea is done correctly.
Ment
Yes, there the sea water differs by having a visible bottom, while the river's bottom is not visible. I usually pour river water on top of the sea water.
That's disappointing, I thought it would be possible to directly fill it with sea water and not have to go to such lengths:(
In reply to Kehich
User Avatar
14 years ago
Auto-translated
Here's the script I wrote:
function regF()
SetAmbientLight(0, "/Lights/_(AmbientLight)/Tests/Night.xdb#xpointer(/AmbientLight)", nil, 0);
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "reg", "regF");

Nothing appears in the console, but the lighting doesn't change. What's the error?
In reply to Олегарх
14 years ago
Auto-translated
Oligarch
I wrote this script:
function regF()
SetAmbientLight(0, "/Lights/_(AmbientLight)/Tests/Night.xdb#xpointer(/AmbientLight)", nil, 0);
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "reg", "regF");

Nothing appears in the console, but the lighting doesn't change. What's the error?


Have you tried changing the word "nil" to "false"?
User Avatar
14 years ago
Auto-translated
Usually, it's nil, and the manual provides incorrect information. But you can omit the last two parameters altogether, as they are optional.
 

К А
Стикеры GBF в Telegram
User Avatar
14 years ago
Auto-translated
Good day, I have a few questions:

1. Is there a function that can determine whether a hero is controlled by a player or AI? (For example, for multiplayer maps, so that if playing against the AI, it would be possible to additionally instruct the behavior of the AI heroes using scripts).
2. Can anyone provide an example (briefly) of how to use scripts to change the "amount" of creature growth in buildings (non-city buildings)?
3. Is it possible to express a function through a script so that the following happens: the player enters a battle for a castle, captures it, and if certain n conditions are met, then immediately receives a random hero "from the city's roster." Is this possible? ;)
User Avatar
14 years ago
Auto-translated
1. Is there a way to determine whether a hero is controlled by a player or AI? (e.g., for multiplayer maps, so that if playing against the AI, it would be possible to additionally instruct the behavior of AI heroes using scripts).
Only in 3.1 using IsAIPlayer(playerId); (determines whether the player is a human or the AI).
2. Can anyone provide an example (brief) of how to use scripts to change the "amount" of creature growth in buildings (not cities)?
Changing the growth rate with scripts? I haven't tried. With a mod – please do.
3. Is it possible to express a function through a script so that the following happens: a player enters a battle for a castle, captures it, and if certain n conditions are met, they immediately receive a random hero "from the city's roster." Is this possible?
It is possible. In an infinite loop, check the castle's ownership; if it belongs to the desired player, give them a hero and exit the loop. It will be difficult to make it random, but a specific hero is possible.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
14 years ago
Auto-translated
Ment
Only in 3.1 using IsAIPlayer(playerId); (determines if the player is human or AI)

thank you, can you give an example of how to execute this command for a human player and an AI player, please?

for example: if IsAIPlayer(PLAYER_1) == what? could it be equal to 0/1?
Ment
Can you change the growth rate with scripts? I haven't tried. With a mod -- please.

modify a specific building or how?
In reply to KioM
14 years ago
Auto-translated
KioM


Is it possible to modify a specific building, or how?


You can modify a specific building (using a script), or you can modify the entire data type of buildings (this is done with a mod).

For example, there's a "Fairy Dwelling" on the map, and only in this dwelling can you recruit 50 Hunters (or Phoenixes) weekly (or even daily – that's what the script is for!).

A mod does almost the same thing – recruiting Hunters (50 weekly, but not daily!) or Phoenixes – the only difference is that in other Fairy Dwellings, there will also be Hunters or Phoenixes (while in the scripted version, Hunters/Phoenixes are only available in one dwelling, and the rest have standard fairies).
User Avatar
14 years ago
Auto-translated
antonag07, I can't say (if I know) whether there is a map here that implements similar features; it's not clear yet... I figured out how to easily allow any creature to be recruited in any building, but I don't know how to control the quantity...
In reply to KioM
14 years ago
Auto-translated
Good day. I might be posting in the wrong thread, and this question has probably already been asked and answered, but I couldn't find it in the topics. Please provide a link to a mod for the editor that adds the ability to place dwellings for creatures of levels 4, 5, 6, and 7 on the map, each level separately. If there is a topic or section on the site where the mod or a link to it is posted, please redirect me there.
In reply to Ment
User Avatar
14 years ago
Auto-translated
Ment
Usually, it's nil, and the manual provides incorrect information. But you can omit the last two parameters altogether; they are optional.
Either way, nothing happens.
In reply to Kehich
User Avatar
14 years ago
Auto-translated
Kehich
Good afternoon. Perhaps I'm posting in the wrong thread, and this question has probably already been asked and answered, but I couldn't find it in the threads. Please provide a link to a mod for the editor that adds the ability to place dwellings for creatures of levels 4, 5, 6, and 7 on the map, each level separately. If there is a thread or section on the site where the mod or a link to it is posted, please redirect me there.

In the standard editor, there is a "Dwellings" tab -> ... "Military Post" for each faction, and in the object settings, you can prohibit, for example, hiring creatures of levels 4, 5, and 6, leaving only level 7, or allow all, or have one creature of each level in each object.

Statistics

Welcome our newest member: recijeb