Skip to content
User Avatar
#2478
Auto-translated
AstralLein
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?
You can try removing the changes that make it possible to open the console and enter commands into it, using the consoleCmd function.
Something like
consoleCmd('unbind show_console')
or
consoleCmd('setvar dev_console_password = ')
and do this, for example, in an infinite loop.
I haven't tested this, but in theory, it should work.

And most importantly: such an anti-cheat script can also be easily removed from the map's main script if desired.

Added 1 hour 8 minutes ago
Cirillo
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? :)
I think using if is the most correct and logical option. But you can also set a trigger to call the first function and, already in it, reassign it to the second.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4