Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: [EUD] Self-modifying Trigger
[EUD] Self-modifying Trigger
Jan 22 2014, 2:00 pm
By: trgk  

May 12 2014, 3:42 pm trgk Post #21



cf) Is anybody interested in EUD actions here?


Anyway, basic concept #2 : Variable.

With Set Deaths actions, you can
[ add / subtract / set ] [ specific address ] to [ specific value ]

Since
- [ add / subtract / set ]
- [ specific address ]
- [ specific value ]
is stored somewhere in SC memory, they can be modified with SetDeaths if their address is known.
eudasm automatically calculates every trigger, conditions, and actions's addresses and makes it visible to eudasm code.

Collapsable Box





Consider the following code

Code
Trigger: @B
   Actions:
       SetDeaths(0, SetTo, 0, 0) @b+20 @bplayer+16 @bmodtype+24



In trigger B,
b = (Address of SetDeaths action) + 20
bplayer = ( same ) + 16
bmodtype = ( same ) + 24

Refering to CHK reference says that
- bmodtype is a pointer to ( [ add / subtract / set ] + some other things )
- bplayer is a pointer to [ specific address ]
- b is a pointer to [ specific value ]


We call that
- Trigger B declares variable b

To use variable b, adjust memory at b, bplayer, and bmodtype, and call trigger B.


Example)
Code
Trigger: @B
   next @B_next
   Actions:
       SetDeaths(0, SetTo, 0, 0) @b+20 @bplayer+16 @bmodtype+24

Trigger: @main // assume that this trigger is executed first
   next B

   Actions:
       SetDeaths(&b, SetTo, 1234, 0)  // b = 1234

       SetDeaths(&bplayer, SetTo, &0x123456, 0)    //  target address. &(0x123456) = epd player corresponding to 0x123456
       // bplayer : offset. &bplayer : epd player index

       SetDeaths(&bmodtype, SetTo, 0x072D0000)   // = (Set To = 0x072D0000)

       // Trigger B will be executed after here, and SetDeaths statement in B will do
       // *(ulong*)0x123456 = b
       // We can add/sub/set arbitary address with variable.



// incomplete



EUD

May 12 2014, 4:09 pm CecilSunkure Post #22



I'm interested in the collective knowledge about EUD actions, but no I won't myself use them to make anything. Thanks for posting up this information though!



None.

May 12 2014, 8:52 pm LoveLess Post #23

Let me show you how to hump without making love.

What it comes down to is that we enjoy learning new tricks and methods behind BW, but as a mapping community, most of us prefer to avoid EUD Actions as it restricts the accessibility of the map.

Anything learned on the EUD Conditions side, however, we are all eager to learn even the smallest things because they can vastly what we are able to create. Examples of such things are some of the projects by Kaias and Lethal, as they made things that were previously though impossible a realistic goal through a series of workaround methods using one or two complicated systems. All of that was made possible by Oreo and memory reading.



None.

Jun 14 2014, 1:28 am trgk Post #24



Another example. Zergling gets slower when they are not on the creep.
[attach=9526]

Attachments:
creeptest.scx
Hits: 1 Size: 107.82kb
fafasf.png
Hits: 0 Size: 497.75kb

Post has been edited 1 time(s), last time on Jun 14 2014, 1:34 am by trgk.



EUD

Oct 17 2014, 2:48 am trgk Post #25



Example : Multiplayer key detection

Select SCV, Press Z, X key, and SCV will move accordingly.

Attachments:
out.scx
Hits: 0 Size: 100.52kb

Post has been edited 5 time(s), last time on Oct 17 2014, 9:57 am by trgk.



EUD

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
Please log in to shout.


Members Online: IlyaSnopchenko, Roy, jun3hong