Skip to content

Current questions and answers regarding the map editor.

User Avatar
#2332
Auto-translated
yes, it is.
Trigger (NEW_DAY_TRIGGER , 'day1')
day = 0

function day1 ()
day = day + 1
if day == 7 then
AddObjectCreatures ('object_name' , ID, count)
AddObjectCreatures ('object_name' , ID, count)
day = 0
end
end

The code is not error-proof. It might be worth experimenting with the numbers in day == 7, but I'm too lazy to check.

Or, an alternative option: It is most likely a one-time event, as I am not sure how the absolute day works.
Trigger (NEW_DAY_TRIGGER , 'day1')

function day1 ()
if GetDate(ABSOLUTE_DAY) / 8 == 1 then
AddObjectCreatures ('object_name' , ID, count)
AddObjectCreatures ('object_name' , ID, count)
end
end

Whatever