Staredit Network > Forums > Modding Assistance > Topic: Dereferencing actions
Dereferencing actions
Feb 2 2009, 6:11 pm
By: Biophysicist  

Feb 2 2009, 6:11 pm Biophysicist Post #1



I'm trying to make my mod cycle through all the units in the map and do stuff depending on the unit's kills. A_of-s_t said I'd need to dereference an action and make it use my code instead. How would I do this?

Also, how would I cycle through all the units? I know ASM, but I don't know how I'd do that. (I know how to do everything else I want to do, though.)

EDIT: That's actions as in trigger actions, he said I would have to "dereference" some trigger action and put that action in a preserved trigger with Always as the condition.

Post has been edited 1 time(s), last time on Feb 2 2009, 7:47 pm by TassadarZeratul.



None.

Feb 2 2009, 10:00 pm O)FaRTy1billion[MM] Post #2

👻 👾 👽 💪

Find the Action function pointer table and replace the pointer you want with the pointer to your code.
Find the unit node array. There is 1700 entries, each being 336 bytes.
I believe "+0x8F - BYTE bKillCount" is what you want.

Unit Table + 0x8F
Read it, do whatever, add 336.
Either keep a counter or check if it is >= unit table + 0x8F + 336*1700.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[06:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
[2024-5-16. : 8:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[2024-5-16. : 5:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[2024-5-16. : 5:24 pm]
lil-Inferno -- poopoo
[2024-5-16. : 5:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
Please log in to shout.


Members Online: Ultraviolet, 5giannae9485hM3, fithplanet, 3emmac8691yM7, Sylph-Of-Space