Skip to content

Posts from Current questions and answers regarding the map editor.

5.0 (12 ratings)
User Avatar
#4709
Auto-translated
A simple answer: turn on the light.
 

К А
Стикеры GBF в Telegram
User Avatar
#4710
Auto-translated
Godric's Hollow, the obelisk is disabled just like any other object. Your code is currently just a meaningless collection of functions. Try to clearly understand these two points: code that needs to be executed at the start of the map should be written OUTSIDE of functions, and code that needs to be executed when an event occurs should be written INSIDE a function that is called by that event. Formulate your algorithm as a series of simple steps, like this:
1) The obelisk should never function in its standard way, so it needs to be disabled at the start of the map.
2) When the obelisk is touched, a battle should start, so a trigger for touching it at the start of the map needs to be assigned to it.
and so on.
Then, simply find the appropriate functions for each step.
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
In reply to Ment
User Avatar
#4711
Auto-translated
Ment
A simple answer: turn on the light.
Thank you very much, it helped.
У меча предназначения два острия, одно из них ты.

Заинтересованный занимается написанием прохождений
Прохождения]
НЕКРОМАНТ

2,3,4,5
Заинтересованный планирует создать серию мультиплеерных карт "Фантазия безумного картострителей".
Миссия 1 - Фктиф-Зобар готова на 11,5%
#4712
Auto-translated
Good afternoon. I need help with a problem.
I want to make it so that at a certain point, the AI gets the Tear of Ashera (building or artifact – it doesn't matter).
I tried adding it via a script:
GiveArtefact("Eruina", 53);
The Grail doesn't appear in the AI's inventory, and moreover, it doesn't appear even if I directly check the box for the Tear of Ashera for the hero when creating the map. At the same time, it works for the player's hero.
The standard method of finding it through obelisks is not suitable in this case.
In reply to am-wrag
#4713
Auto-translated
Have you set a trigger for the new day?
#4714
REGION_ENTER_AND_STOP_TRIGGER
In reply to am-wrag
#4715
Auto-translated
Why specifically this trigger? Or was it intended that entering a certain region would grant a tear?

Added 1 minute ago
Please provide the complete function; there might be an error somewhere.
#4716
Auto-translated
Yes, the idea is that when entering a specific location, the AI should receive a Pelt or its building. Are there any other ways to give the AI this item?

Added 3 minutes ago
Godric's Hollow
Why this trigger specifically? Or was it intended that entering a certain region would grant a Pelt?

Added 1 minute ago
Please provide the complete function; there might be an error somewhere.

The script only doesn't work with the Pelt and only with the AI. With other artifacts, and if the hero is controlled by the player, everything works fine.
function AshaTest()
GiveArtefact("Pelt", 53);
GiveArtefact("Pelt", 47);
MessageBox(GetMapDataPath().."AshaText.txt");
end;

function AshaTest2()
GiveArtefact("Eruina", 53);
GiveArtefact("Eruina", 48);
end;

Trigger(REGION_ENTER_AND_STOP_TRIGGER, "GiveArtTestReg", "AshaTest");
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "test1", "AshaTest2");
In reply to am-wrag
#4717
Auto-translated
Another option is to calculate the tile of the main enemy hero and place this tear in front of him.

Added 1 minute ago
Maybe I'm missing something, but why do you need 2 triggers? Perhaps that's why the error is occurring.

Added 47 seconds ago
I understand now.

Added 2 minutes ago
I only have 2 options: make the enemy hero go to a specific point and dig up the tear, or simply place the tear in front of the hero. I'm not sure about the latter, as the tear is an invisible artifact. It might not work.
#4718
Auto-translated
Isn't it possible to place a Tear as a simple, visible artifact in Heroes 5? I thought that as an object on the map, it could only be buried, and only the first one placed could be dug up if there are several.
In reply to am-wrag
#4719
Auto-translated
Well, that's what I'm saying – it probably won't work. I think your idea is to make the enemy hero go and dig up the Tear.

Added 1 minute ago
Or, you could give the Tear to a hero, and they would stand there with it from the beginning, and then you could make them go to the Castle.

Added 19 hours 7 minutes ago
I need help with a rather complex script:
function halk()
QuestionBox("Maps\SingleMissions\Revenge of the\tsrhsad.txt", "Transform")
end
function Transform()
local gold, wood, ore, mercury, crystal, sulfur, gem = GetPlayerResource(1, GOLD, WOOD, ORE, MERCURY, CRYSTAL, SULFUR, GEM)
if gold >= 15000 then
if wood >= 5 then
if ore >= 5 then
if mercury >= 5 then
if crystal >= 5 then
if sulfur >= 25 then
if gem >= 5 then
SetPlayerResource(1, GOLD, gold - 15000, WOOD, wood - 5, ORE, ore - 5, MERCURY, mercury - 5, CRYSTAL, crystal - 5, SULFUR, sulfur - 25, GEM, gem - 5)

RazeTown("tone1")
else
MessageBox("Maps\SingleMissions\Revenge of the\xfh.txt")
end
end
end
end
end
end
end
Trigger(OBJECT_TOUCH_TRIGGER, "tone1", "halk")
This is the main part of the script. The question is, where do I set IsRemovable? Do I need to click on the town and then in the left part of the screen, or somewhere else? As I understand it, this is what controls whether the town is removed. So, the next question is: how do I place a ruined Human town in the same spot? I think there are people who know. Thanks in advance!
In reply to Годрикова впадина
#4720
Auto-translated
Can anyone help me?:smile36:
User Avatar
#4722
Auto-translated
how does GetObjectPosition(objectname) work?
in an if statement, if it gives me an error because of the 3 values.
User Avatar
#4723
Auto-translated
DarkLordax, local x, y, f = GetObjectPosition(objectname);
if ((x == REQUIRED_X) and (y == REQUIRED_Y) and (f == REQUIRED_FLOOR)) then
YOUR CODE
end
РПГ-сценарий для HoMM5: Путь героя
ЧаВо по созданию карт для HoMM5: ЧаВо
In reply to Jack_of_shadows
#4724
Auto-translated
Could you possibly help me with my script?

Statistics

Welcome our newest member: Emil