Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", nil );
Posts from Scripts
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", nil );
should be placed after the line
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", nil );
Also, the line Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", "dop1" ); should definitely be after the 'end', not before. Also, the line Trigger(OBJECT_TOUCH_TRIGGER, "fenix", "fenixF" ); should be placed after the nearest 'end', not before.
but most likely the line
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", nil );
should be placed after the line
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", nil );
Added 7 minutes ago
Something started working...
Now the message I wanted is displayed, if prog is equal to one, the trigger didn't reset, everything is as intended, BUT for some reason, issuing the quest didn't work, the main trigger, where SetObjectiveState is... however, there is progress. Currently, the script looks like this:
function dopF()
prog = 1;
MessageBox(GetMapDataPath().."text10.txt");
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "wayF", nil);
sleep(5);
SetObjectiveState('obj_dop', OBJECTIVE_ACTIVE);
SetObjectiveVisible('obj_dop', true, PLAYER_1);
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "wayF", "dopF");
end;
function dop1()
if prog == 1 then
MessageBox(GetMapDataPath().."text11.txt");
elseif prog == 2 then
SetObjectiveState("obj_dop", OBJECTIVE_COMPLETED);
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", nil);
AddHeroCreatures("hero", 64, 30);
end;
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", "dop1");
function fenixF()
Trigger(OBJECT_TOUCH_TRIGGER, "fenix", nil);
prog = prog + 1;
end;
Trigger(OBJECT_TOUCH_TRIGGER, "fenix", "fenixF");
Весьма хороший попутчик... До первого перекрестка.
Added 1 minute ago
If anyone is interested, the working script looks like this:
function dopF () prog = 1; MessageBox (GetMapDataPath().."text10.txt"); Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way", nil ); sleep (5); SetObjectiveState('obj_dop', OBJECTIVE_ACTIVE); SetObjectiveVisible( 'obj_dop', true, PLAYER_1 ); end; Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way", "dopF" );
function dop1 () if prog == 1 then MessageBox (GetMapDataPath().."text11.txt");
elseif prog == 2 then SetObjectiveState("obj_dop", OBJECTIVE_COMPLETED); Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", nil ); AddHeroCreatures("hero", 64, 30); end; end; Trigger(REGION_ENTER_AND_STOP_TRIGGER, "way1", "dop1" );
function fenixF () Trigger(OBJECT_TOUCH_TRIGGER, "fenix", nil ); prog = prog +1; end; Trigger(OBJECT_TOUCH_TRIGGER, "fenix", "fenixF" );
Три недели: /topic/at/583154/
Неспокойные земли: /topic/9211/
Неравное Противостояние: /topic/9473/
You can do this: create a trigger on a region, use GetDate in the condition, and vary the dates using elseif. (I haven't used this function, so I'm not sure if it's possible to return only the day or, depending on the parameter, return the day, week, or month. You can check this in the manual.)
GetDate(week) - returns the week number relative to the month (1, 2, 3, 4).
NHF 0.90 : NHF - группа в VK
Карты для HeroesV:
Путешествие , Условие крови , Рука судьбы.Часть 1: В поход , Рука судьбы.Часть 2: Отчаянье , Рука судьбы.Часть 3: Восхождение , Стойкость
Абсолютная власть , Иду на Вы! , Корона Ургаша , На задворках
Мир надо уничтожить... Чтобы создать свой...
What are absolute and relative days?
Три недели: /topic/at/583154/
Неспокойные земли: /topic/9211/
Неравное Противостояние: /topic/9473/
I created a map, but there's nothing interesting in it.:confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused:
For example:
PlayObjectAnimation("priest","attack00",IDLE);
The name must be your own, script-based name. To name a creature with that name, you need to select it, find the Name line in the left panel, and enter the name there (in our case,
priest
).