Thank you, I hope I'll figure it out.
First, let's take an array of names:
Town1 - the town that, when touched, should trigger the script.
Objective_1 - the objective that should be completed.
We'll write a trigger for the town - this is the only way.
TRIGGER(OBJECT_TOUCH_TRIGGER, 'Town1', 'TownF') - here, we specified the object's name and gave the function a name (you can name it anything).
Now, let's write the function itself.
function TownF()
TRIGGER(OBJECT_TOUCH_TRIGGER, 'Town1', nil)
sleep(5)
SetObjectiveState('Objective_1', OBJECTIVE_COMPLETED)
sleep(10)
SetObjectiveState('Objective_2', OBJECTIVE_ACTIVE)
end;
Added 11 hours and 2 minutes ago
Hello everyone, I have a couple of questions:
1) How do I change a hero's specialization?
2) How do I remove the player turn panel?
3) There's a quest to defeat demons. This quest is executed through a script. The essence of the quest is to defeat two groups of demons, i.e., one demon will be located in one place, and another demon in another place. After the demons are defeated, the task will be updated: you need to return for a reward. How can I create such a quest?
And the script with the demons will be something like this:
First, we introduce a constant:
deamons = 0;
Now, we attach triggers to the demons (if you have heroes, use their script names; if they are creatures, use the names you gave them).
TRIGGER(OBJECT_TOUCH_TRIGGER, 'Grol', 'CheckF')
TRIGGER(OBJECT_TOUCH_TRIGGER, 'Nimus', 'CheckF')
We write a function that checks if the demons are still on the map, and if not, it adds one to our constant.
function CheckF()
sleep(5)
If IsObjectExists('Grol', false)
then
deamons = deamons + 1;
sleep(5)
If IsObjectExists('Nimus', false)
then
deamons = deamons + 1;
sleep(5)
If deamons = 2
then
Set_Objective_State('Objective_1', OBJECTIVE_COMPLETED)
sleep(5)
end;
BUT! This script isn't easy, and I can't guarantee its functionality until I test it in the game
На острие меча.
Кампания "Искупление" - 15%
О кампании
"Искупление" - это мой амбициозный проект. Давняя мечта. С детства играя в героев, я восхищался персонажами и ландшафтами, сюжетом и стилем оригинальной трилогии, я мечтал привнести что-то свое в эту игру, и наконец, более-менее освоив нелегкий труд картостроителя, взялся за воплощение мечты. Кампания расскажет о будущем выживших рыцарей Кровавой Стали, о пути, который они избрали, и о том, куда этот путь их приведет. К слову, мне нужен тестер-оценщик. Если хочешь принять участие в создании и есть определенный опыт, то - добро пожаловать!