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.
[11:09 pm]
Ultraviolet -- :wob:
[2024-6-12. : 6:23 am]
Ultraviolet -- got some light recalls behind too
[2024-6-12. : 12:07 am]
O)FaRTy1billion[MM] -- 🦗
[2024-6-11. : 9:53 pm]
Wing Zero -- I wonder how he knew I was in the market for a good cricket bat
[2024-6-11. : 2:27 pm]
lil-Inferno -- ya
[2024-6-11. : 10:49 am]
Oh_Man -- or scarab maybeh
[2024-6-11. : 10:49 am]
Oh_Man -- shielt battery + photon cannon blast?
[2024-6-11. : 10:49 am]
Oh_Man -- check out the animation at 7:56
[2024-6-11. : 9:06 am]
Oh_Man -- https://youtu.be/3mpjxspSUtQ I defeated the hell boss yall, bow to my power
[2024-6-10. : 5:04 pm]
lil-Inferno -- poop
Please log in to shout.


Members Online: myocytebd, NudeRaider, Oh_Man, Moose