Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Eud detection of a unit
[SOLVED] Eud detection of a unit
This topic is locked. You can no longer write replies here.
Jul 16 2012, 12:24 pm
By: GGmano  

Jul 16 2012, 12:24 pm GGmano Post #1

Mr.Pete-Tong

I want a ghost owned by computer player to launch a nuke.. that ive found out, but my problem is that i have two computer forces fighting so when ghost launches the nuke its very vulnerable for beeing killed and nuke goes to waste. So i want to set ghost invinsible(or instant reheal their health) for the time inbetween nuke is launched and to the momemt that ghost is finish launching the nuke.

Can anyone help me?

If i could detect the excakt ghost and only make this ghost invinsible it would be preferable, but it can work the other way around also that i set all ghost invinsible for the short period of time.



A Legendary Map Maker, Player. Apparently im more than intresting to observe Irl

Ill try do my best in making all youre watchers happy

The maps I made are tweaked into perfection and maximum strategy added

Jul 16 2012, 3:39 pm NudeRaider Post #2

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

When you run the AI script "AI nuke here" at "BOOM" you could make the location BOOM large enough so the ghost is included. Then you can heal all ghosts in that location. Don't know of a way to narrow it down further.




Jul 16 2012, 3:42 pm staxx Post #3



I've told you before how to make this work on your map.

Use a different type of ghost, when nuke is built create that ghost with invincible properties let it launch the nuke, then remove that ghost. This way only 1 ghost is getting set to invin as it is different from the ghosts that your computer force have.



None.

Jul 16 2012, 5:37 pm Biophysicist Post #4



Except that hero Ghosts can't nuke.

EDIT: Anyway, making a specific Ghost invulnerable through EUDs isn't feasible. EUDs work by index, but other triggers work by position.



None.

Jul 16 2012, 6:26 pm staxx Post #5



Correct.

However, this is for desert strike. He can use hero ghosts as a regular spawn unit and set the stats as he wishes while using a regular ghost to do what i just described above.

There are other alternatives to "detecting" a single ghost without the use of eud's as well. The above mentioned is just a real basic method and is extremely easy to implement.

Post has been edited 1 time(s), last time on Jul 16 2012, 6:33 pm by staxx.



None.

Jul 17 2012, 1:45 am Roy Post #6

An artist's depiction of an Extended Unit Death

If you want to take the EUD route, you have a couple options.

Before your options, you have the setup. If you can track the Index IDs for all ghosts, you shouldn't have a problem. If you can't, you'll need to make a trigger for each unit index (1700 triggers). EUDGen doesn't have the EUDs you'll need to use, unfortunately, so you'll have to write them by hand.

Finding the correct Ghost will be expensive. You'll need to cycle through Ghosts with the Give 1 Unit method, and check if the unit owner of the Ghost has changed for each possible index. You can see that this becomes unfeasible when you cannot track a range of Index IDs, because it will be 1700n checks, where n is the max number of Ghosts on the map. Worst case scenario, you'll need to make 2893400 triggers.

If you want to just make all Ghosts invincible, you'll just need a trigger for each possible unit index (Worst case: 1700 triggers).

Here's the breakdown for detecting a unit with a launch nuke order on EPD 19044:
Code
Address     Type              Value
0x59CCF4    bPlayerID         0-11
0x59CCF5    bMainOrderID      129
0x59CCF6    bMainOrderState   6
0x59CCF7    bOrderSignal      0

You'll want to check each Ghost's +0x4C address for a value between 426240-426251, depending on which player owns the Ghost (you can use the range if you want it to be agnostic about player owner). While some Ghost has that order value, you want Ghosts to be invincible. I would suggest having a switch that is constantly cleared at the top of the trigger list, and each of the index-checking triggers will set the switch when it is true. Then, at the bottom of the trigger list, set invincibility to enabled if the switch is set, and set it to disabled if the switch is cleared.

OR YOU COULD DO THIS:

Attachments:
ControlTest.scx
Hits: 2 Size: 39.84kb




Jul 17 2012, 10:08 am GGmano Post #7

Mr.Pete-Tong

Quote from NudeRaider
When you run the AI script "AI nuke here" at "BOOM" you could make the location BOOM large enough so the ghost is included. Then you can heal all ghosts in that location. Don't know of a way to narrow it down further.

Quote from staxx
I've told you before how to make this work on your map.

Use a different type of ghost, when nuke is built create that ghost with invincible properties let it launch the nuke, then remove that ghost. This way only 1 ghost is getting set to invin as it is different from the ghosts that your computer force have.

I dont need the ai nuke action since i dont want the ghost to launch at at precise timing, i want the ghost the launch the nuke when beeing shot at. reason cause im not using nuke as a special. The nuke should be fired by a random ghost owned by computer player(p4) when randomly beeing shot at. it all works but i needed to make sure the ghost dosent die when shot at.

Quote from Roy
If you want to take the EUD route, you have a couple options.

Before your options, you have the setup. If you can track the Index IDs for all ghosts, you shouldn't have a problem. If you can't, you'll need to make a trigger for each unit index (1700 triggers). EUDGen doesn't have the EUDs you'll need to use, unfortunately, so you'll have to write them by hand.

Finding the correct Ghost will be expensive. You'll need to cycle through Ghosts with the Give 1 Unit method, and check if the unit owner of the Ghost has changed for each possible index. You can see that this becomes unfeasible when you cannot track a range of Index IDs, because it will be 1700n checks, where n is the max number of Ghosts on the map. Worst case scenario, you'll need to make 2893400 triggers.

If you want to just make all Ghosts invincible, you'll just need a trigger for each possible unit index (Worst case: 1700 triggers).

Here's the breakdown for detecting a unit with a launch nuke order on EPD 19044:

Code

Address Type Value
0x59CCF4 bPlayerID 0-11
0x59CCF5 bMainOrderID 129
0x59CCF6 bMainOrderState 6
0x59CCF7 bOrderSignal 0

You'll want to check each Ghost's +0x4C address for a value between 426240-426251, depending on which player owns the Ghost (you can use the range if you want it to be agnostic about player owner). While some Ghost has that order value, you want Ghosts to be invincible. I would suggest having a switch that is constantly cleared at the top of the trigger list, and each of the index-checking triggers will set the switch when it is true. Then, at the bottom of the trigger list, set invincibility to enabled if the switch is set, and set it to disabled if the switch is cleared..

Ive read and tryid out your eudgenerator and searched euddb ive found the adress for the text but had to go work last night so didnt finish it up.. i dont need eud action to set the ghost invinsible only needed eudtrigger to detect when nuke is fired.. tryid typing in nuclear missile is launched as text in your eudgenerator and it came up with several triggers in condition at that point i was abit lost.

But you also made the shortcut that i needed.. look further down

Quote from Roy
OR YOU COULD DO THIS:

Heres the answer to my prayers: THE SHORT CUT OF DETECTING WHEN A NUCLEAR MISSILE IS LAUNCHED IS SHOWN AT THE FILE THAT ROY ATTATCHED... Thank you alot roy can i send you some minerals for that answer?

Subject can be closed.

Post has been edited 3 time(s), last time on Jul 17 2012, 10:29 am by GGmano.



A Legendary Map Maker, Player. Apparently im more than intresting to observe Irl

Ill try do my best in making all youre watchers happy

The maps I made are tweaked into perfection and maximum strategy added

Jul 17 2012, 10:26 am staxx Post #8



For future reference, you can detect nukes stored inside a silo by "command" nuke coming out of silo with "bring" and nuke landing with "bring".



None.

Jul 17 2012, 10:34 am GGmano Post #9

Mr.Pete-Tong

Quote from staxx
For future reference, you can detect nukes stored inside a silo by "command" nuke coming out of silo with "bring" and nuke landing with "bring".

I know that but didnt need the ghost to be invinsible all the time that the nuke silo dosent have a nuclear missile in it Roy made the answer to it look at hes file if you in doubt on how it works.. I could have thought of that method but it didnt come up in mind. to detect when the nuclear is above the nuclear silo cause that is the excakt time that the nuke is launched by a random ghost.



A Legendary Map Maker, Player. Apparently im more than intresting to observe Irl

Ill try do my best in making all youre watchers happy

The maps I made are tweaked into perfection and maximum strategy added

Jul 17 2012, 10:42 am staxx Post #10



Thats what i was referring to by
Quote
nuke coming out of silo with "bring"




None.

Jul 17 2012, 1:10 pm Roy Post #11

An artist's depiction of an Extended Unit Death

Quote from staxx
For future reference, you can detect nukes stored inside a silo by "command" nuke coming out of silo with "bring" and nuke landing with "bring".
Actually, the Bring condition will also detect nukes inside of a silo. If you want to test this, you can put a location over the silo (or use the "Anywhere" location) and the condition will be true when the silo has a nuke inside it. I'm not sure if that's what you meant, but I'm mentioning this just for clarity.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
Please log in to shout.


Members Online: Roy, Ultraviolet