Current time: 03.05.2024, 07:20 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Ваши вопросы по ERM-скриптам
Author Message
Archer30 Online
Moderators

Posts: 1126
Post: #8461

Here I come again 96-copy

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 112


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 05.10.2021 05:47 by Archer30.)
04.10.2021 18:14
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16502
Post: #8462

Will be solved in the next release. Ok.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
04.10.2021 20:48
Find all posts by this user Quote this message in a reply
Archer30 Online
Moderators

Posts: 1126
Post: #8463

Berserker, great news! 132


Latest ERA mods and scripts in development - My GitHub
05.10.2021 05:47
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #8464

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?
(This post was last modified: 15.10.2021 08:50 by Valery.)
15.10.2021 08:50
Find all posts by this user Quote this message in a reply
SergOz Offline

Posts: 1294
Post: #8465

Valery, а с другими существами работает?


Карта-мод "Война на Холсте"
15.10.2021 11:21
Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2277
Post: #8466

Монстр должен быть прописан в текстовике для генерации на карте, тогда заработает.
15.10.2021 11:51
Find all posts by this user Quote this message in a reply
Archer30 Online
Moderators

Posts: 1126
Post: #8467

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.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 20.10.2021 17:49 by Archer30.)
20.10.2021 17:27
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16502
Post: #8468

There is no on key released event currently. Do we need the whole bunch of OnKeyReleased events with global variables, etc?


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
20.10.2021 18:13
Find all posts by this user Quote this message in a reply
Archer30 Online
Moderators

Posts: 1126
Post: #8469

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. Rolleyes

Welll, "alternative quesiton". Is there a way to trigger a function with A + mouse click?


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 20.10.2021 23:05 by Archer30.)
20.10.2021 19:02
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16502
Post: #8470

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.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
20.10.2021 22:46
Find all posts by this user Quote this message in a reply
Archer30 Online
Moderators

Posts: 1126
Post: #8471

Berserker, appreciate for the help! I will make good use of the feature Yes

____

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? Unsure

Edit: Fixed. Updated on GitHub


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 30.10.2021 16:09 by Archer30.)
21.10.2021 15:18
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16502
Post: #8472

Archer30, why the values on these addresses must be the same? What bug do different values cause?


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
22.10.2021 12:04
Find all posts by this user Quote this message in a reply
Archer30 Online
Moderators

Posts: 1126
Post: #8473

(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 147 Looks like the game has some "verification" that won't allow the ability to trigger if values aren't the same.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 22.10.2021 15:09 by Archer30.)
22.10.2021 13:39
Find all posts by this user Quote this message in a reply
Bes Offline

Posts: 5422
Post: #8474

(16.01.2017 20:30)igrik Wrote:  Города:
...

всё отлично, изначально в игре значение 3 имеется... выставляю 10 - обязательная неделя Бесов уходит.
как вернуть назад бонус, установка значения 3 ничего не даёт... ставлю на 7 дне, ночую и.. неделя не возвращается.
две мысли про это
-либо после сброса через 10 в памяти подхватывается что-то другое и простым восстановлением по умолчанию (3) уже не вернуть и надо ещё где-то что-то поменять
-либо после восстановления надо сохранить игру, выйти и вновь зайти, хотя не совсем в этот способ верю (ночью опробую)


Image: team-supermod.gif
25.10.2021 15:51
Visit this user's website Find all posts by this user Quote this message in a reply
Bes Offline

Posts: 5422
Post: #8475

Quote:-либо после восстановления надо сохранить игру, выйти и вновь зайти, хотя не совсем в этот способ верю (ночью опробую)
проверил, возвращается бонус Yes

(19.12.2019 14:53)Berserker Wrote:  Бесследно убрать стек с поля боя:
посмотрел, как это в игре смотрится и увидел недостаток.
Перед исчезновением в окошке численности отрда успевает появиться ноль, и только потом всё плавно исчезает.
Не очень красиво (я такие мелочи не могу пропустить), потому здесь можно добавить строку с сокрытием окошка численности.
Тогда стэк и его кол-во одновременно исчезают, и сам ноль не мелькает.

Есть недостаток - при переигровке (плагином) до дейтвия такого удалённого отряда окошка численности нет (почему-то плагин этот момент не восстанавливает). Но это актуально,если удалять живой отряд... если стирать мёртвый, мною предложенную строку в принципе можно не использовать

И второй момент, не вижу смысла получать флаги стэка, добавлять туда флаг "жертва" и потом обновлять флаги.
Раз нам уже не важен стэк, то просто сразу ему записывать нужный флаг, без оглядки на уже имеющиеся
плагин переигровки восстанавливает изначальные флаги корректно и тут скрытых камней я не увидел при такой реализации кода


Image: team-supermod.gif
26.10.2021 13:46
Visit this user's website Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2024 MyBB Group