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.
[03:18 am]
Symmetry -- Make maps for the memes :hurr:
[08:19 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: damn, if that doesn't scream UV, I don't know what does. https://staredit.net/382067/
hah yeah in the past that might've been up my alley. haven't really been mapping lately, been too busy with everything else. and kinda lost interest too tbh. just not enough people left on SC to feel worth investing the time personally.
[2026-10-30. : 8:03 pm]
lil-Inferno -- u
[2026-10-30. : 7:38 am]
NudeRaider -- damn, if that doesn't scream UV, I don't know what does. https://staredit.net/382067/
[2026-10-30. : 6:55 am]
UndeadStar -- :wob:
[2026-10-30. : 2:28 am]
Symmetry -- :wob:
[2026-10-29. : 9:17 pm]
RIVE -- :wob:
[2026-10-29. : 7:03 pm]
CoCo( -- OK, click here if any1 is interested in this $ making opportunity https://staredit.net/topic/18952/
[2026-10-29. : 4:39 pm]
NudeRaider -- sure, make a post in ums assistance
[2026-10-29. : 6:44 am]
CoCo( -- anyone willing to help fix a few triggers on a new "impossible" map? Please
Please log in to shout.


Members Online: Roy, anoeth47, Symmetry, Milestone