Skip to content

Posts from Scripts for beginners. Auto-translated

4.5 (2 ratings)
In reply to ggroy
User Avatar
#16
Auto-translated
ggroy
Incorrectly specified - is this the path to the question text?
And also, is the creature type written as a script name?
1) Yes
2) It's an identifier, either numerical or literal. For example, for skeletal archers, the numerical identifier is 30, and the literal identifier is CREATURE_SKELETON_ARCHER. You can find the identifier in Editor Documentation\HOMM5_IDs_for_scripts.pdf.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
#17
Auto-translated
Thanks for the information, sorry if I'm bothering you with my stupidity. These scripts are just too complex, and I really want to create something original. :D

Added 1 minute ago
If such a thing exists (of course), could you please provide the Russian version of Editor Documentation\HOMM5_IDs_for_scripts.pdf?
[url=Таверна (фулдилка) - заходите.


User Avatar
#20
Auto-translated
RemoveObject("object_name") – add this in the required quantity to the second function after then.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#21
Auto-translated
Thank you very much, you helped me a lot. But I have a small problem. After hiring creatures, they don't want to enter the hero (like when clicking on the hero's picture). They only enter the castle.
[url=Таверна (фулдилка) - заходите.


User Avatar
#23
Auto-translated
Okay, thanks, I'll try.

Added after 38 seconds
Do you know what might be causing this?
[url=Таверна (фулдилка) - заходите.


User Avatar
#24
Auto-translated
No, I don't know. I haven't encountered this before.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#25
Auto-translated
Hey, here's another question. I installed the script you gave me twice (on two different territories), and here's the problem: on the first territory, the specified object disappears, but on the second, it doesn't. What's the issue?
[url=Таверна (фулдилка) - заходите.


User Avatar
#26
Auto-translated
What does the final script look like?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#27
Auto-translated
Here are two scripts. In the middle is another script.
function hire1(hero) hire1_hero = hero MessageBox("/Maps/Multiplayer/Test s Naimom/kamillaF.txt") QuestionBox("Maps/Multiplayer/Test s Naimom/Wopros.txt", "hire1_ok") end function hire1_ok() local gold = GetPlayerResource(PLAYER_1, GOLD) if gold >= 0 then RemoveObject("krest1") RemoveObject("krest2") RemoveObject("krest3") RemoveObject("krest4") RemoveObject("krest5") RemoveObject("krest6") RemoveObject("krest7") RemoveObject("krest8") Trigger(REGION_ENTER_AND_STOP_TRIGGER, "unnamed 0", nil) SetPlayerResource(PLAYER_1, GOLD, gold - 0) AddHeroCreatures(hire1_hero, CREATURE_PEASANT, 50) else end end Trigger(REGION_ENTER_AND_STOP_TRIGGER, "unnamed 0", "hire1"); SetRegionBlocked ("kamilla",true,1); function hire1(hero) hire1_hero = hero MessageBox("/Maps/Multiplayer/Test s Naimom/kamillaF.txt") QuestionBox("Maps/Multiplayer/Test s Naimom/Wopros.txt", "hire1_ok") end function hire1_ok() local gold = GetPlayerResource(PLAYER_1, GOLD) if gold >= 0 then RemoveObject("kr1") RemoveObject("kr2") RemoveObject("kr3") RemoveObject("kr4") Trigger(REGION_ENTER_AND_STOP_TRIGGER, "unnamed 1", nil) SetPlayerResource(PLAYER_1, GOLD, gold - 0) AddHeroCreatures(hire1_hero, CREATURE_PEASANT, 50) else end end Trigger(REGION_ENTER_AND_STOP_TRIGGER, "unnamed 1", "hire1");
[url=Таверна (фулдилка) - заходите.


User Avatar
#28
Auto-translated
Because you didn't rename the copied functions.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
#29
Auto-translated
Sorry - WHAT?

Added 3 minutes later
I apologize, but I didn't quite understand.
[url=Таверна (фулдилка) - заходите.


User Avatar
#30
Auto-translated
If you're duplicating, give the functions different names, not hire1, but hire2, for example. Do the same with everything else.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4