Current time: 12.04.2025, 02:45 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Логические/математические операции на ЕРМ
» операции с флагами монстров и др.
Author Message
Berserker Offline
Administrators

Posts: 16734
Post: #46

Archer30, https://dropmefiles.com/neUkr
math.era plugin !!SN:A, L. E to execute ^sqrt^ function with STDCALL convention, accepting e-variable and returning result in e1.


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

Posts: 1190
Post: #47

132 Thanks a lot, Berserker!


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 13.12.2020 18:32 by Archer30.)
13.12.2020 18:31
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1190
Post: #48

Berserker, I'm having trouble dealing with this math.era, could you help, please?

  1. ZVSE
  2. !?FU(OnGameEnter);
  3. !!FU2233335:P144;
  4. !?FU2233335;
  5. !!SN:L^math.era^/?y1;
  6. !!SN:Ay1/^sqrt^/?y2;
  7. !!SN:Ey2/4/x1;
  8. !!IF:M^e1=%e1^;

I keep getting e1 = 0.00 Fie


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

Posts: 16734
Post: #49

  1. ZVSE
  2. !?FU(OnGameEnter);
  3. !!FU2233335:P144;
  4. !?FU2233335;
  5. !!SN:L^math.era^/?y1;
  6. !!SN:Ay1/^sqrt^/?y2;
  7. !!VRe2:Sx1;
  8. !!SN:Ey2/5/e2;
  9. !!IF:M^e1=%e1^;


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

Posts: 1190
Post: #50

Thanks, Berserker. Didn't know there is SN:E#1/5 too...


Latest ERA mods and scripts in development - My GitHub
13.12.2020 21:40
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16734
Post: #51

Main issue is that you pass integer x1, not floating point number e. They have different binary representation.


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

Posts: 19
Post: #52

Добрый день, не очень понятно как сделать в MA из двухклеточного одноклеточного монстра (как наоборот ясно, через хлаги, а тут как-то минусовать надо)
(This post was last modified: 28.01.2022 05:17 by Sashka40.)
28.01.2022 05:15
Find all posts by this user Quote this message in a reply
igrik Offline

Posts: 2819
Post: #53

(28.01.2022 05:15)Sashka40 Wrote:  Добрый день, не очень понятно как сделать в MA из двухклеточного одноклеточного монстра (как наоборот ясно, через хлаги, а тут как-то минусовать надо)
  1. ; Пример: дать флаг монстру
  2. !!IF:M^Теперь Арбалетчики стреляют дважды^;
  3. !!MA:X2/?y1; [записать все монстра №2 в y1-переменную]
  4. !!VRy1:|32768; [добавить флаг двойной атаки]
  5. !!MA:X2/y1; [установить новые значения флагов монстру №2]
  6. ; Пример: забрать флаг у монстра
  7. !!IF:M^Теперь Тяжёлые Арбалетчики стреляют единожды^;
  8. !!MA:X3/?y1; [записать все флаги монстра №3 в y1-переменную]
  9. !!VRy1:|32768 -32768; [безопасный способ: сначал дать флаг, потом забрать его]
  10. !!MA:X3/y1; [установить новые значения флагов монстру №3]
Bes, добавь этот пример в справку. Вопрос по отключеню определённого флага довольно частый (и желательно не использовать i-переменную)


game bug fixes extended.dll || My Plugins || My GitHub
28.01.2022 06:20
Visit this user's website Find all posts by this user Quote this message in a reply
Sashka40 Offline

Posts: 19
Post: #54

igrik, Спасибо вам!
(This post was last modified: 28.01.2022 06:46 by Sashka40.)
28.01.2022 06:44
Find all posts by this user Quote this message in a reply
SergOz Offline

Posts: 1332
Post: #55

Где-то видел, а сейчас не могу найти... Хотя, такому самое место в этой теме.
В общем, мне нужно, на ERM, возводить число в степень n.
На ум приходят только какие-то длинннннющие коды.
Может, кто знает как это сделать красиво?


Карта-мод "Война на Холсте"
10.07.2023 09:56
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1190
Post: #56

SergOz, There is Pow from Era Erm Framework
  1. !?FU(Pow);
  2. ; Raises value to specified power. All arguments and result are floats.
  3. !#VA(base:x) (power:x) (result:x);
  4. !!SN:F^.Erm_Pow^/(base)/(power);
  5. !!VR(result):Ce1;

To use:
  1. !?FU(OnGameEnter);
  2. !!VR(float1:e):S2;
  3. !!VR(float2:e):S3;
  4. !!FU(Pow):P(float1)/(float2)/?(floatResult:e);
  5. !!VR(num:y):S(floatResult);
  6. !!IF:M^%(num)^;


Latest ERA mods and scripts in development - My GitHub
10.07.2023 10:29
Find all posts by this user Quote this message in a reply
SergOz Offline

Posts: 1332
Post: #57

Archer30, спасибо Thank_you
А как ты понял слово "длинннннющие"? 96 это типа "lonnnnnng"?


Карта-мод "Война на Холсте"
(This post was last modified: 10.07.2023 12:43 by SergOz.)
10.07.2023 12:41
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16734
Post: #58

Тот же яндекс переводит как «long». Прогресс.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
10.07.2023 23:20
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-2025 MyBB Group