Here I come again
Is there a trigger right after a building is built (after CA:B3 value is set)?
OnBuildTownBuilding serve a similar purpose, however, the huge drawback of it is that it triggers before the CA:B3 value is set. Thus it is not suitable for certain events that must trigger after building. These events have to be moved to !?CM trigger right now, lame

Will be solved in the next release. Ok.
A guy making a wog map asked in HC for a script setting ghosts as monster appearing every week on the map. I tried to set Ghosts as occurring every first day of the week from a timer (!!UN:M2/159) but it does not work. Is anything I miss about that?
Valery, а с другими существами работает?
Монстр должен быть прописан в текстовике для генерации на карте, тогда заработает.
Question, is it possible to set variables when a key is pressed and released? For example, press Ctrl, set a variable. Release Ctrl, set the variable again.
I tried with this but with no success. Looks like the "is not down" msg shows when my A key was holding, ideally it should only show when my A is released.
There is no on key released event currently. Do we need the whole bunch of OnKeyReleased events with global variables, etc?
Berserker, only this particular case. Optional I guess. A hook for "On A Key is released" is welcome, or I will try with an alternative implementation.
Welll, "alternative quesiton". Is there a way to trigger a function with A + mouse click?
Archer30, there is no fast way to check A + click. You have to call GetKeyState manually on mouse event, like Era Erm Framework does for system keys. However some soft like Comodo Firewall treats multiple key checks as keylogging attempts and may block some attempts. Really, if you check each key state each millisecond, it's a keylogger.
I will have to add OnKeyReleased, probably, to be able to keep currently pressed key globally.
Berserker, appreciate for the help! I will make good use of the feature
____
New question:
So I tried to write a template for any creature to use the Lycanthropy ability. It worked well but still some details need to be fixed.
The problem: Looks like I can't manage to set different creatures on these addresses:
Quote:7762908, 7763122 and 7763743
aka
the creature who triggers this ability,
the creature who is immune to the ability and
the creature of the victim would be transformed to.
The values of these addressed must be exactly the same, otherwise, Lycanthropy won't trigger at all. This is not very ideal to what I wish for.
My code:
lycan - main.erm
0 lycan - specific creature.erm
Also on
GitHub
Any thought?
Edit: Fixed. Updated on
GitHub
Archer30, why the values on these addresses must be the same? What bug do different values cause?
(22.10.2021 12:04)Berserker Wrote: [ -> ]Archer30, why the values on these addresses must be the same? What bug do different values cause?
That's exactly why I'm here

Looks like the game has some "verification" that won't allow the ability to trigger if values aren't the same.
(16.01.2017 20:30)igrik Wrote: [ -> ]Города:
...
всё отлично, изначально в игре значение 3 имеется... выставляю 10 - обязательная неделя Бесов уходит.
как вернуть назад бонус, установка значения 3 ничего не даёт... ставлю на 7 дне, ночую и.. неделя не возвращается.
две мысли про это
-либо после сброса через 10 в памяти подхватывается что-то другое и простым восстановлением по умолчанию (3) уже не вернуть и надо ещё где-то что-то поменять
-либо после восстановления надо сохранить игру, выйти и вновь зайти, хотя не совсем в этот способ верю (ночью опробую)
Quote:-либо после восстановления надо сохранить игру, выйти и вновь зайти, хотя не совсем в этот способ верю (ночью опробую)
проверил, возвращается бонус
(19.12.2019 14:53)Berserker Wrote: [ -> ]Бесследно убрать стек с поля боя:
посмотрел, как это в игре смотрится и увидел недостаток.
Перед исчезновением в окошке численности отрда успевает появиться ноль, и только потом всё плавно исчезает.
Не очень красиво (я такие мелочи не могу пропустить), потому здесь можно добавить строку с сокрытием окошка численности.
Тогда стэк и его кол-во одновременно исчезают, и сам ноль не мелькает.
Есть недостаток - при переигровке (плагином) до дейтвия такого удалённого отряда окошка численности нет (почему-то плагин этот момент не восстанавливает). Но это актуально,если удалять живой отряд... если стирать мёртвый, мною предложенную строку в принципе можно не использовать
И второй момент, не вижу смысла получать флаги стэка, добавлять туда флаг "жертва" и потом обновлять флаги.
Раз нам уже не важен стэк, то просто сразу ему записывать нужный флаг, без оглядки на уже имеющиеся
плагин переигровки восстанавливает изначальные флаги корректно и тут скрытых камней я не увидел при такой реализации кода