Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Detecting when a unit shoots
Detecting when a unit shoots
Apr 19 2009, 3:36 pm
By: Dem0n  

Apr 19 2009, 3:36 pm Dem0n Post #1

ᕕ( ᐛ )ᕗ

Can someone show me how to make a trigger that detects every time raynor (marine), duran, and gui montag shoots with EUDs? I really would like to use this for a map that I'm making.




Apr 19 2009, 9:36 pm rockz Post #2

ᴄʜᴇᴇsᴇ ɪᴛ!

http://farty1billion.dyndns.org/EUDDB/?pg=ref&a=unitnode
If you can't figure out how to do it with the information I've given you, click on the EUD links in the sticky, and learn more about EUDs. I don't have time right now to make you a trigger.

+0x64 - CUNIT* AttackingUnit

Also, take a gander at halloween priest, and http://www.staredit.net/?attachment=3202



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Apr 19 2009, 10:19 pm poiuy_qwert Post #3

PyMS and ProTRG developer

The offset you gave was an entry in the CWEAPON struct, not the CUNIT struct... Anyway, even if that was in the CUNIT struct, just because you have a unit targeted to be attacked doesn't mean you are attacking it at that time. Use:
+0x55 - BYTE bGroundWeaponCooldown
+0x56 - BYTE bAirWeaponCooldown

If its >0 the unit has attacked and is waiting for the cooldown to attack again.




Apr 19 2009, 11:24 pm rockz Post #4

ᴄʜᴇᴇsᴇ ɪᴛ!

I hadn't looked into it, that was just one location I thought might work. cooldown makes more sense.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Apr 19 2009, 11:47 pm Dem0n Post #5

ᕕ( ᐛ )ᕗ

O.o I'm sorry, but the only thing I know how to do with EUDs is detect how much HP a unit has. XD I honestly don't understand anything you guys are saying. :(




Apr 20 2009, 12:20 am rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

You're one step there, If you know the unit HP, then you know the unit's HP address. From there, add the difference to the address to find the unit cooldown (It's 0x55 and 0x56 more than the start of the unit). If you can't figure this out, it's probably not for you.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Apr 20 2009, 12:42 am Dem0n Post #7

ᕕ( ᐛ )ᕗ

Wait, what? What do you mean by "add the difference"? I found the address for Jim Raynor (Marine), but I'm confused as to what I should do now. :O




Apr 20 2009, 1:44 am rockz Post #8

ᴄʜᴇᴇsᴇ ɪᴛ!

you found the address for Unit 1. Unit 1 has a number in it which says exactly what unit it is (00 00 would be terran marine). Now you need to add in 56 and subtract whatever the hp offset is. Open up artmoney, go to the memory address, and see if you can figure out where everything is based on that link I gave you, and watch the numbers change as you have the unit attacking someone/taking damage.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:39 pm]
Vrael -- 6000 apm near perfect focus fire is yikes
[06:38 pm]
Vrael -- paralyze was metaphorically speaking, paralyzed
[06:38 pm]
Vrael -- wasnt even that really, they 6000 apm just made the terran army so much more value/$ that the extra economy didnt matter
[01:58 pm]
NudeRaider -- NudeRaider
NudeRaider shouted: Oh_Man nothing too special tbh. the human player wasn't ready to combat the push that stretched almost the whole map. So this game means nothing. We'll have to see how it goes once the humans have adjusted for its unorthodox strategies.
they basically lost most of their army in one big battle and didn't have the time and production to leverage the economic advantage and come back from that blow.
[01:55 pm]
NudeRaider -- Oh_Man
Oh_Man shouted: https://youtu.be/1vsTqNwHquE omg guys it's happening. ITS HAPPENING. EVERONY STAY CALM. STAY F:wob::wob:CKING CALM!
not sure why you are so hyped, when basically the same happened 7 years ago with AlphaStar on SC2.
[01:53 pm]
NudeRaider -- Oh_Man
Oh_Man shouted: 6000 apm XD, i dont even understand how it culd came back wen it was 5 base vs 2
nothing too special tbh. the human player wasn't ready to combat the push that stretched almost the whole map. So this game means nothing. We'll have to see how it goes once the humans have adjusted for its unorthodox strategies.
[10:59 am]
NimoStar -- "Sick" is the appropriate word for the disease that AI is foisting upon our society. Repent, ye sinners!
[06:32 am]
Ultraviolet -- that was pretty sick lol
[02:55 am]
Oh_Man -- 6000 apm XD, i dont even understand how it culd came back wen it was 5 base vs 2
[02:42 am]
Symmetry -- 'twas only a matter of time
Please log in to shout.


Members Online: Roy, Symmetry