Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: anyone know detect unit's attack with EUD triggers?
anyone know detect unit's attack with EUD triggers?
May 21 2008, 9:59 am
By: sin2614  

May 21 2008, 9:59 am sin2614 Post #1



in the map "halloween priest"
When Ghost Attack something,
EUD Triggers Detect Ghost's Attack and Subtract 1 ore.
I need someone who teach me about This
Reply me plz.



None.

May 21 2008, 11:52 am midget_man_66 Post #2



Are you aiming for an "Ammo" feature? if so... you can do it without eud's, it would do the same thing as an eud trigger with the exception that it would not reduce minerals/ore per shot, Rather per kill.

Its simply a matter of detecting kill score, removing minerals, and when out of ammo auto-ally them to the enemy. If you have rounds per clip you need maybe another trigger to reload minerals per ore/ore per minerals..w/e it is at the time.



None.

May 21 2008, 1:23 pm Ahli Post #3

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

I bet nobody made that with EUDs untill now. Can EUDs detect when a unit fires?
I would guess that it is possible. But I don't think that we already know the address in the memory.

I bet in that map you kill units instantly (1 shot = 1 kill = raising kill score), or?
That's just the normal solution midget_man_66 already explained.




May 21 2008, 7:14 pm poiuy_qwert Post #4

PyMS and ProTRG developer

You could use the units cooldown to detect when it has fired:
Code
Conditions:
- Cooldown is 1
- Switch 1 is clear
Actions:
- Reduce ammo
- Set Switch 1

...

Conditions:
- Cooldown is X
- Switch 1 is clear
Actions:
- Reduce ammo
- Set Switch 1


Conditions:
- Cooldown is 0
- Switch 1 is set
Actions:
- Clear Switch 1





May 21 2008, 7:25 pm NudeRaider Post #5

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

You could. But it's highly inaccurate. Especially when the unit is moving instead of shooting.
You could also implement a move detection but it still would lag behind.
Also cooldowns also have partly random values and sometimes turn/lock times have to be added.




May 21 2008, 7:31 pm poiuy_qwert Post #6

PyMS and ProTRG developer

I dont see why it would be inaccurate as long as you use hyper triggers.
Why would the cooldown change while walking? I havn't checked with ArtMoney, but i just don't think that happens.
I also don't think they have random values, there is a static number you can set in datedit for the cooldown. But that wouldn't make a difference anyway, you just make triggers for a cooldown of 1 to X where X is the highest it goes or higher to be safe.




May 21 2008, 8:02 pm Falkoner Post #7



Yes, but if you are walking you are not firing, but your system assumes you are. And the iscript makes it slightly random, along with turning to shoot and other variables.



None.

May 21 2008, 8:06 pm Heimdal Post #8



Cooldown should work perfectly. The reason you are having trouble with movement is that the movement timer is at 0x54 and cooldown is at 0x55: http://farty1billion.dyndns.org/EUDDB/?pg=ref&a=unitnode

Since you can't modify those values directly, I can't think of a great way to extract the second byte without just making a LOT of triggers. And that's just for one unit.

To the OP: do you have a copy of the map you're talking about?



None.

May 21 2008, 10:19 pm poiuy_qwert Post #9

PyMS and ProTRG developer

Yeah I knew the cooldown would work, I forgot to mention though that i didn't know if it was possible because of the 4 byte reading of the death command. Thanks for clarifying Heimdal.




May 22 2008, 12:03 am stickynote Post #10



I did something else, where, instead of using the cool down, I kept the player and the allied so that they wouldn't attack each other. Then, when another player brought a unit to a location centered on your unit that was the size of the units range. I unallied them to allow them to attack, then subtracted the ammo, then made them allied again. This way, I could also reduce a unit's range if necessary by making that location smaller, and I could also control the units attack speed by making the time it took for them to unally slower.



None.

May 22 2008, 9:16 am NudeRaider Post #11

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from poiuy_qwert
I dont see why it would be inaccurate as long as you use hyper triggers.
Why would the cooldown change while walking? I havn't checked with ArtMoney, but i just don't think that happens.
I thought you mean the estimation method solely based on passed time when not using EUDs.




May 24 2008, 3:36 pm sin2614 Post #12



Thanks Tips!!!



None.

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:
[03: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, AleXoundOS