Posts from Scripts
How can I make a specific number of units appear in a specific city on a specific week? And is this even possible?
Trigger(NEW_DAY_TRIGGER, 'handler_name');
GetDate(ABSOLUTE_DAY);
AddObjectCreatures('city_name', creature_type, quantity, slot_number);
Trigger(NEW_DAY_TRIGGER, 'handler_name');
GetDate(ABSOLUTE_DAY);
AddObjectCreatures('town_name', creature_type, quantity, slot_number);
And in the second line of the script, should I write "ABSOLUTE_DAY" in parentheses?
Added 16 minutes later
So, for example, if I want 15 Paladins to appear in my town on the 3rd week, what would this script look like?
"Handler Name" - the name of the function that will be called when the trigger is activated.
ABSOLUTE_DAY - it must be written exactly like that. 3 weeks is approximately 15 days. So, you need to check if the value returned by GetDate(ABSOLUTE_DAY) is equal to 15.
"Handler name" - the name of the function that will be called when the trigger is activated.
ABSOLUTE_DAY - it must be written exactly like this. 3 weeks is approximately 15 days. So, you need to check that the value returned by GetDate(ABSOLUTE_DAY) is equal to 15.
And how do you check that the value returned by GetDate(ABSOLUTE_DAY) is equal to 15?
after capturing objects
The enemy hero has become an ally
Could you please tell me: in the SetRegionBlocked script, what should be entered in the status field to set the region to be blocked?
nil - open.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
1 - blocked,
nil - open.
Added 14 minutes later
So, here's another question: in the "GetPlayerResource" script, there's a player and a resource type, but how do you specify the amount of resource received?
So, here's another question: in the "GetPlayerResource" script, there's a player and a resource type, but how do you specify the amount of resource received?
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
The function that handles the new day doesn't receive a parameter with the hero's name. Therefore, the if...then statement needs to be removed, as well as one of the end statements. In StartCombat, the hero's name also needs to be enclosed in quotation marks.