How does the SetObjectiveProgress function work?
So, if a quest has these stages, it will start at stage zero, and you can use the function to advance it further, for example, to move to stage 1:
SetObjectiveProgress('quest_name', 1);
New here? I'm Roha — want a quick tour?
How does the SetObjectiveProgress function work?
SetObjectiveProgress('quest_name', 1);
How do I remove the faction circles under neutral creatures?
Is it possible to place creatures on the map from a hero's army?
Is it possible to disable cheats on a map?
Added 37 seconds ago
For example, a script that kills the main hero when cheats are used?
Another question arose. How can I make it so that one function is triggered the first time a region is visited, and a different one the second time? Someone already asked about this on the forum, but I couldn't find it.
It worked! I did it using if and else.
But still, is it possible to do this in another way? :)
In my opinion, using an if statement is the most correct and logical approach. However, you could also set a trigger to call the first function and, within that function, reassign it to the second.
Could you write the script in an infinite loop?
function foo()
while 1 do
-- insert code here
sleep(10);
end
end
startThread(foo)How can I make it so that one function is triggered the first time a region is visited, and another function is triggered the second time?
region_visit_counter = 0;
function foo()
region_visit_counter = region_visit_counter + 1;
if (region_visit_counter == 1) then
-- first visit, call the appropriate function
else
-- all subsequent visits, call a different function
end
end
Each hero gains 2 points to magic at the very last day of the month. How do I implement this condition?
if ((GetDate(WEEK) == 4) and (GetDate(DAY_OF_WEEK) == 7)) then ...I want these creatures on the map to appear as single units but have larger stacks in battle.
How can I disable Astral Gate and Portal to Town spells on the map?
I set up a quest at the Seer's Hut and chose "Army" as the reward type. Where do I enter which creatures to give?
Also, how do I set a specific number of creatures in a Crypt?