Current time: 22.11.2024, 17:57 Hello There, Guest! (LoginRegister)
Language: english | russian  

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

Posts: 2819
Post: #4726

Ah, well, of course. There, all deffence is read into the attack parameter, and the defence is returned to 0. This code is from the display of the dialog that you are talking about
Image: aAezDaVtUYE.jpg

upd: I can give you the code with the hooker so that the defence is displayed. Necessary?


game bug fixes extended.dll || My Plugins || My GitHub
19.12.2017 16:24
Visit this user's website Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4727

Thanks, is not for me, I wanted to reply to a request in HC erm thread. So I think he wants the hook. I can give him the additional code except the hook
(This post was last modified: 19.12.2017 16:45 by Valery.)
19.12.2017 16:45
Find all posts by this user Quote this message in a reply
igrik Offline

Posts: 2819
Post: #4728

Image: Rt-b6d3KWNU.jpg
Even the hook was not needed

But please note! This is only in the display of the message
So, when dealing damage, deffence will not be taken into account.


game bug fixes extended.dll || My Plugins || My GitHub
19.12.2017 16:49
Visit this user's website Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4729

Where did you place this code, in instructions or in battle scripts? I placed the first in both but no change, not sure what to do.
(This post was last modified: 19.12.2017 17:07 by Valery.)
19.12.2017 17:05
Find all posts by this user Quote this message in a reply
igrik Offline

Posts: 2819
Post: #4730

Valery, You probably put both the code. Only one is needed


game bug fixes extended.dll || My Plugins || My GitHub
19.12.2017 17:08
Visit this user's website Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4731

Works, thanks.))

   Also, I don't remember but there was a way to update stack stats right after casting a spell, was it BG1 then check if hero cast spell, or some other command?
(This post was last modified: 19.12.2017 17:32 by Valery.)
19.12.2017 17:20
Find all posts by this user Quote this message in a reply
igrik Offline

Posts: 2819
Post: #4732

The parameters should be updated instantly.
Is it better to specify the exact case...

For example if "hastle"


game bug fixes extended.dll || My Plugins || My GitHub
19.12.2017 17:37
Visit this user's website Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4733

No, I mean to update scripted defense. You said that your script only shows visually defense, but real defense will still be zero, right? So I have to use !!BMx16: D[add defense] etc to update real defense (in combination with your code), or I misunderstood?

You said: "So, when dealing damage, deffence will not be taken into account. "
(This post was last modified: 19.12.2017 19:04 by Valery.)
19.12.2017 19:03
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #4734

Such code changes should be place in

!?FU(OnGameEnter);

and restored in

!?FU(OnGameLeave);


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

Posts: 2819
Post: #4735

(19.12.2017 19:03)Valery Wrote:  No, I mean to update scripted defense. You said that your script only shows visually defense, but real defense will still be zero, right?
Yes!!
(19.12.2017 19:03)Valery Wrote:  So I have to use !!BMx16: D[add defense] etc to update real defense (in combination with your code), or I misunderstood?
Will not works. The defence parameter will just go into the attack, and the defence will still remain 0.


game bug fixes extended.dll || My Plugins || My GitHub
19.12.2017 19:41
Visit this user's website Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4736

Are you sure? because in the debug message when I reinitialized the defense on a frenzied stack, it returns the proper value, it just didn't show.
19.12.2017 20:31
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4737

Valery, and before you set the defense it returned 0?


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
20.12.2017 00:36
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4738

Good catch, indeed it returns always initial defense

Didn't think of that 147
20.12.2017 01:19
Find all posts by this user Quote this message in a reply
igrik Offline

Posts: 2819
Post: #4739

Так-с. Так как пост на HC содержал немного другую формулировку - ответ запишу и сюда:

szaman Wrote:It's possible to make via ERM a script that makes NOT LOSING DEFENSE POINTS when casting frenzy spell?
Можно ли сделать через ERM скрипт, чтобы не терялись очки обороны при произнесении заклинания "Бешенство"?


game bug fixes extended.dll || My Plugins || My GitHub
20.12.2017 15:35
Visit this user's website Find all posts by this user Quote this message in a reply
VandaLM Offline

Posts: 14
Post: #4740

Здравствуйте уважаемые обитатели форума! Недавно решил заняться скриптописанием на erm. Естественно начали возникать проблемы, но не такие серьёзные и по мере возможности и изучения я их решал. Но не в этом случае. Мне нужно, чтобы при каждом бое (неважно с вражеским героем или нейтралом) на войска накладывалась защита от магии огня. Вот что у меня получилось:
!?BA0;
!!BA:H0/?v30;
!!BA:H1/?v31;
!!HEv30&v30<>-2:N?v32;
!!HEv31&v31<>-2:N?v33;
!!VRv25&v30<>-2/v32=49:S0;
!!DO23/0/20/1&v30<>-2/v32=49:P;
!!VRv25&v31<>-2/v33=49:S21;
!!DO23/0/20/1&v31<>-2/v33=49:P;
!?FU23;
!!BMv25:M31/99/3;
!!VRv25:+1;

Вообщем-то запускаю карту, ошибок не выдаёт, но в бою заклинание не накладывает. Что не так сделал? Премного буду благодарен за помощь!


Мой репак музыки
03.01.2018 17:16
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