Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
In reply to Ment
User Avatar
#1110
Auto-translated
I was looking for answers on the forum, but without success. Maybe the question has already been asked, but I'll repeat it.
1) How do I set the conditions for defeat/victory?
2) How do I make it so that:
a) the city is chosen in the game menu (i.e., which city should I place in the editor, since random is exactly random)?
b) so that buildings with units (like the demon cauldron) are tied to the player's city, i.e., when I choose Necropolis, there will be skeletons, for Fortress - mountain defenders, etc.
User Avatar
#1112
Auto-translated
1) How to set the conditions for defeat/victory?
The simplest way: MapPropretiesTree -> objectives -> primary -> 0 -> objectiveKind (type), Name, Description, and so on.
I don't have any experience with the second point, sorry.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
#1113
Auto-translated
Ment
The simplest way: MapPropretiesTree -> objectives ->primary->0->objectiveKind (type), Name, Description, and so on.
I found this, but which item is directly responsible for victory/defeat? For example, if a hero is killed, it's game over.
Sorry for being a noob.
User Avatar
#1114
Auto-translated
In the `kind` property, select `OBJECTIVE_KIND_HERO_MUST_SURVIVE`. In `Parameters`, create a new field where you write the script name of the hero.
 

К А
Стикеры GBF в Telegram
In reply to Ment
User Avatar
#1115
Auto-translated
The issues with the town and hero have been resolved, but there's still a problem with the identical appearance of the barracks and the town, and a new problem has emerged: the player's team freezes (meaning they can't select another unit, otherwise the entire game breaks). Aside from that, everything seems to be working, and after this, the map can be fully tested.
User Avatar
#1116
Auto-translated
With teams, it's easy: just go to MapPropertiesTree, find the "players" string, expand it, and adjust the "CanBeHumanPlayer" and "CanBeComputerPlayer" settings for each.
 

К А
Стикеры GBF в Telegram
In reply to Вестник
#1117
Auto-translated
Herald
The issues with the town and hero have been resolved, but there remains a problem with the identical appearance of the barracks and the town, and a new problem has emerged: the player's team freezes (meaning they cannot select another unit, which ruins the entire game). Otherwise, everything seems to be working, and after that, you can fully test the map.
You can simplify the identity issue by setting the barracks' properties to "Like player" (choose the one you need) or "Like town" (check the coordinates). This eliminates the need for scripts.
In reply to Олегарх
User Avatar
#1118
Auto-translated
Thank you. It's called day_light_foggy.
User Avatar
#1119
Auto-translated
I can't find some of the story heroes, such as Agrael, Tieru, Markel, Sandro, etc. Can you tell me where to find them?
User Avatar
#1120
Auto-translated
Place any hero on the map, select their ObjectPropretiesTree, click on the "..." next to the Shared line, and find the hero's data in the list. Some of them have different names (for example, Marcel is named Berein).
 

К А
Стикеры GBF в Telegram
In reply to Вестник
User Avatar
#1121
Auto-translated
Herald
I can't find some of the story heroes, such as Agrail, Tieru, Markel, Sandro, etc. Can you tell me where to find them?

heroes tab (scenario)

and is there lighting with the falling snow?
In reply to Олегарх
User Avatar
#1122
Auto-translated
How can I give a player, for example, sulfur, using scripts? There are two commands: SetPlayerResources and ChangePlayerResources. In both cases, the following happens: for example, I set the script to give 10 crystals, but the player already has 20. When the script is "activated," the player ends up with 10 crystals.
In reply to Олегарх
#1123
Auto-translated
Oligarch
How can I give a player, for example, sulfur, using scripts? There are two commands: SetPlayerResources and ChangePlayerResources, or something like that. In both cases, this happens: for example, I set the script to give 10 crystals, but the player already has 20. When the script is "activated," the player ends up with 10 crystals.


You probably messed up the script – I suspect that the computer is giving your player 10 crystals because that's exactly what you wrote in the script. ;)

Post the source code.
In reply to antonag07
User Avatar
#1124
Auto-translated
antonag07
Most likely, you made a mistake in the script – I suspect that the computer is giving your player 10 crystals because that's exactly how you wrote it ;)

Share the source code :)
function regF()
SetAmbientLight (0, "Tu", true, 5);
ChangeResource (1, 5, 10);
end;
Trigger (REGION_ENTER_AND_STOP_TRIGGER, "reg", "regF");

Statistics

Welcome our newest member: Emil