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.
[12:34 pm]
NudeRaider -- curiosity kills the cat!
[06:18 am]
Sylph-Of-Space -- No complaints here, i'm just curious!
[11:05 pm]
Ultraviolet -- :wob:
[2024-5-18. : 3:55 pm]
Zoan -- :wob:
[2024-5-18. : 10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[2024-5-18. : 3:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6: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
Please log in to shout.


Members Online: Roy