Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to AstralLein
User Avatar
Auto-translated
AstralLein
Is it possible to track effects on units within a combat script? For example, Berserk.
There is no function that would provide a list of effects currently applied to units. It might be possible to track some effects based on indirect indicators, but this would likely only be possible during the unit's turn, and it's not certain that such guesswork would be accurate.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to AstralLein
User Avatar
Auto-translated
AstralLein
You're welcome.

And can you check the spell cast by a hero during the turn?
Only indirectly.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
Auto-translated
So, it won't be possible to create a counterattack by applying a general speed boost to offset the player's general slowdown... okay.

Then, here's another question: on the Echo of the Void map, Ishkibal casts various spells on all enemy stacks in the final battle... I'd like to make it so that the AI hero similarly casts Overseer on all of its units. How do I do that?

Added 42 minutes later
Damn, I implemented it, but I completely forgot that it's not possible to cast it on all of them due to the mechanics of Overseer itself... But still, thanks for the help, RedHeavenHero).
Карты для героев 5

"Плата за любовь"
"Путь некроманта"
"Темные грани"
"Рок Гримхейма"
Auto-translated
Guys, help me out! Can you write a combat script: a neutral army has archers, clerics, swordsmen, and militia. After the militia die, bone warriors appear in their place; after the archers die, bone archers appear; after the clerics die, liches appear; and after the swordsmen die, zombies appear. Please help.
In reply to Kartoha
User Avatar
Auto-translated
Through the DefenderCreatureDeath(creature) function:
if GetCreatureType(creature) == Unit ID then
SummonCreature(....)
end
User Avatar
Auto-translated
I have a very complex task. I need to implement a system where, if a player completes a quest in one mission, a specific script is triggered or a bonus is awarded in another mission.
In reply to DarkLordax
Auto-translated
DarkLordax
I have a very complex task. I need to implement a system where, if a player completes a quest in one mission, a script is triggered or a bonus is given in another mission.

After completing the quest, use SetGameVar("name", "value") (a number, I think). In the next mission: if GetGameVar("that name") == value then...
Карты: Экспедиция ГрувераНаследие ШантириВременной парадоксПоиски рунной сферыПуть возвращения
In reply to AlekseyS
User Avatar
Auto-translated
AlekseyS
We write this after completing the task: SetGameVar("name","value") (a number, I think), and for the next mission: if GetGameVar("that name") == value then...
Thank you)
I didn't think this function was capable of so much!
Кампания в разработке:
Название не придумал
Выполнено 5%
User Avatar
Auto-translated
Dear friends, is it possible to solve a couple of my problems?
1) I need three specific heroes to simply stand in place and pass their turn – like in "Will of Ashtar" - "Beasts and Bones" - the orcish hero stands in the swamps until Arantir comes there himself.
2) Is it possible to make it so that when a player's hero enters a certain zone, other heroes located there stop their activities of gathering resources and running around houses, and run to attack the intruder?
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



User Avatar
Auto-translated
Here's what's wrong here! function pobor1() if GetObjectiveState("SQ1", 1) == OBJECTIVE_UNKNOWN then SetObjectiveState("SQ1", OBJECTIVE_ACTIVE, 1); MessageBox("Maps/SingleMissions/C1W1/poborQ1.txt", "nothing"); if IsObjectExists("pobornik1") == false then if IsObjectExists("pobornik2") == false then if IsObjectExists("pobornik3") == false then SetObjectiveState("SQ1", OBJECTIVE_COMPLETED, 1); SetObjectEnabled("dwellquest1", true); SetObjectOwner("dwellquest1", 1); Trigger(OBJECT_TOUCH_TRIGGER, "dwellquest1", nil) end; end; end; elseif GetObjectiveState("SQ1", 1) == OBJECTIVE_ACTIVE then if IsObjectExists("pobornik1") == false then if IsObjectExists("pobornik2") == false then if IsObjectExists("pobornik3") == false then MesageBox("Maps/SingleMissions/C1W1/poborEND.txt", "nothing"); SetObjectEnabled("dwellquest1", true); SetObjectOwner("dwellquest", 1); SetObjectiveState("SQ1", OBJECTIVE_COMPLETED, 1); Trigger(OBJECT_TOUCH_TRIGGER, "dwellquest1", nil) end; end; end; end end Trigger(OBJECT_TOUCH_TRIGGER, "dwellquest1", "pobor1") The almighty console writes: ERROR attempt to call a nil value. But where is this nil value? In short, everything works only if all three enemies (pobornik) are killed before taking the quest; then, it will be completed. If you take the quest first, then some nil value error appears!
Кампания в разработке:
Название не придумал
Выполнено 5%
User Avatar
Auto-translated
I will add to this list with other silly, but challenging questions for me. Thank you for your understanding, and I hope it won't be too much trouble for you to provide an answer.
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



In reply to inQizitOr
User Avatar
Auto-translated
inQizitOr
I'll add to this list with other silly, but complex questions for me. Thank you for your understanding, I hope it won't be difficult for you to provide an answer.
Should I provide the script itself or explain the actions of the script (more literally)?
Кампания в разработке:
Название не придумал
Выполнено 5%
In reply to DarkLordax
User Avatar
Auto-translated
DarkLordax
Would you prefer I provide the script itself or explain what the script does (more literally)?
Whatever is more convenient for you.
...И справедливость я несу
На острие меча.


Кампания "Искупление" - 15%



О кампании

"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру,  и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!



Statistics

Welcome our newest member: Emil