Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Detecting the location of last killed unit
Detecting the location of last killed unit
Jul 12 2010, 9:12 am
By: MetalGear  

Jul 12 2010, 9:12 am MetalGear Post #1



I'm working on an RPG and in battle, there are sometimes multiple Zerglings to slay. I need to detect the location of a just-killed Zergling so I can create another unit in its blood once it dies. How?



None.

Jul 12 2010, 11:33 am 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

You could follow each a 1x1 pixel location, but if they burrow or have speed upgrade this can easily mess up.

Otherwise you can still detect dead units for 1 frame which means it's only 50% accurate because triggers run every 2nd frame.
Also when they are owned all by the same player you wouldn't be able to center on the dead one specifically, you'd always get the leftmost.

So your best bet is using a 1x1 pixel location. And if you could use a bigger unit that would be much better because they can't outrun it as easily.




Jul 12 2010, 2:24 pm Azrael Post #3



Quote from NudeRaider
You could follow each a 1x1 pixel location, but if they burrow or have speed upgrade this can easily mess up.
Doesn't work on Zerglings, even without speed upgrade, they move too fast for their size.

The only units it works on are

  • Civilian
  • Goliath
  • Marine (no stim)
  • Medic
  • SCV
  • Siege Tank
  • Vulture (no speed)
  • Drone
  • Lurker
  • Ultralisk (no speed)
  • Archon
  • Dark Archon
  • Dragoon
  • High Templar
  • Probe
  • Reaver

You could use one of these units instead with the aforementioned 1x1 pixel locations. Drones maybe, though you'll need to issue them orders.

Another possibility is to differentiate the Zerglings by unit and player. For example, if you have a Zergling and Hero Zergling representing the same unit, you can now keep track of 2 of them at the same time. If you make them for P7 and P8 (hostile computers) you have 4 trackable units.

Post has been edited 4 time(s), last time on Oct 12 2010, 12:03 pm by DevliN. Reason: Mineral abuse.




Jul 12 2010, 2:37 pm MetalGear Post #4



thanks.. yer i decided to go with the 1x1 location tracker :)



None.

Jul 12 2010, 2:50 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

Quote from name:Azrael.Wrath
The only units it works on are
[list]
I'm pretty sure it works for dts, bats and defilers too.




Jul 12 2010, 3:44 pm rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

These are all the units which can possibly escape a 1x1 location.
Quote from rockz
Here's my theoretical list: (* indicates speed upgrade).
Nuclear Missile
Scarab
Spider Mine
Interceptor
Vulture*
Zergling*
Ultralisk*
Scourge
Broodling
Zealot*
Marine*
Firebat*
Infested Terran
Hydralisk*
Zergling
Dragoon
Dark Templar (Unit)
Infested Kerrigan
Dark Templar (Hero)
Zealot
Civilian
Firebat
Ghost
Sarah Kerrigan
Hydralisk

I'm unsure of the ghost units, hydralisk, and if marines should be included. They have a larger center than firebats, and thus may be able to handle the location.

If you want to test, test them moving DOWN, except for ghost units which should be horizontal. Most units have a very small positive y direction (zealots are 5 pixels, dts are 6 pixels, etc...)
You might have trouble with dragoons, but defilers should work. Firebats can escape, but Gui Montag can't.



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

Jul 12 2010, 6:53 pm Wormer Post #7



Sorry guys, but why not to make the location bigger (like 2x2, 3x3 or whatever) and tweak it's size?



Some.

Jul 12 2010, 7:12 pm NudeRaider Post #8

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

Because there's more than 1 ling.




Jul 12 2010, 9:06 pm Azrael Post #9



Quote from rockz
Firebats can escape, but Gui Montag can't.
I didn't know Gui couldn't, thanks.

Post has been edited 2 time(s), last time on Oct 12 2010, 12:03 pm by DevliN. Reason: Mineral abuse.




Jul 12 2010, 9:18 pm Roy Post #10

An artist's depiction of an Extended Unit Death

Since it hasn't been thrown out there yet, I would suggest maybe a virtual hp system, so you could track the units that are supposed to die via triggers. Depending on the damages done upon the Zerglings, you could also try an EUD hp detection and kill* the Zergling prematurely, although moving the location onto the proper zergling would be a true hassle.

Regarding the 1x1 ID method, if the movement speed isn't crucial to your game play, you could purposefully create movement lag by moving/creating a unit above/below each Zergling. Depending on the number of Zerglings and the size of your map in general, this could create actual lag.


*Probably want to make the illusion of the Zergling dying and just move it elsewhere, because otherwise you'd lose the UnitID.




Jul 12 2010, 11:00 pm Aristocrat Post #11



Why can't you just give the zergling to a different player once it comes within firing range of your hero and constantly move a location on it? If multiple zerglings are onscreen make all but one invincible and give the attackable one to the player that you are centering the location on.



None.

Jul 13 2010, 5:14 pm ImagoDeo Post #12



Quote from Aristocrat
Why can't you just give the zergling to a different player once it comes within firing range of your hero and constantly move a location on it? If multiple zerglings are onscreen make all but one invincible and give the attackable one to the player that you are centering the location on.

In many cases, players will want to decide which Zergling they want to attack, not have the game decide for them. Duh.



None.

Jul 14 2010, 2:20 pm Aristocrat Post #13



Quote from ImagoDeo
Quote from Aristocrat
Why can't you just give the zergling to a different player once it comes within firing range of your hero and constantly move a location on it? If multiple zerglings are onscreen make all but one invincible and give the attackable one to the player that you are centering the location on.

In many cases, players will want to decide which Zergling they want to attack, not have the game decide for them. Duh.

Most people A-move to kill monsters anyways. It's rare to see people manually targeting.

Besides, the invincibility can be attributed to some sort of in-universe "unnatural power" that can be thrown into the plot. No big deal.



None.

Jul 16 2010, 11:23 pm Kimaru2 Post #14



Try take a look at this map for detecting corpses:

Attachments:
Corpse_Finder.scx
Hits: 5 Size: 22.32kb



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Oh_Man, Roy