Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Activate a trigger upon IT death/suicide?
[SOLVED] Activate a trigger upon IT death/suicide?
This topic is locked. You can no longer write replies here.
Mar 6 2012, 3:49 am
By: Virtual Pancake  

Mar 6 2012, 3:49 am Virtual Pancake Post #1



Currently working on a 4v4 CTF map and one of the major ideas I wanted to add to the map was a unique feature for the infested terran.

I currently have this:

For all players, current player brings at least 1 infested terran to anywhere, center location labeled "KILL" on infested terran, preserve trigger.

Now I need something like this.

For all players, current player loses at least 1 infested terran, kill all any unit owned by all players at location labeled "KILL" exactly where infested terran died or suicided/attacked, preserve trigger.

I achieved this effect using the deaths condition but it did not work when it suicided/attacked.

I also need this trigger to function on the infested terran that dies and/or suicides no matter how many infested terrans owned on the map.

Any suggestions?

Post has been edited 2 time(s), last time on Mar 6 2012, 4:27 am by Virtual Pancake.



None.

Mar 6 2012, 4:19 am Roy Post #2

An artist's depiction of an Extended Unit Death

A quick summary from the shoutbox discussion:

- Infested Terrans are player-owned and therefore cannot be cycled through without disrupting play
- Players can own as many Infested Terrans as they want
- LIDs do not work for Infested Terrans

The issue with your current system is that it cannot discern between one Infested Terran and another owned by the same player. By default, the location will center on the leftmost Infested Terran (and on ties, it picks the one with the higher Unit ID). This means if you have one Infested Terran sitting on the left side of the map and you have another one suicide in the middle of the map, the location won't be on the center of the map, but rather on the leftmost Infested Terran, effectively breaking the effect you want to create.

Two possible solutions are:

1) Switch from Infested Terran to a unit that works for LIDs.
2) Enforce a restriction to only allow each player to own at most 1 Infested Terran at a time.

And before anyone brings it up: no, this is not a task for EUDs, and the reason is because it is involved with units dying, which EUDs are ironically bad at tracking.




Mar 6 2012, 4:40 am Sacrieur Post #3

Still Napping

We can't detect if an IT committed suicide after the fact directly, so we're going to have to invoke a less desirable and less direct method.

First let's start with tracking. You will need to uniquely track every IT on the field owned by separate players. It's in your best interest to limit the amount a current player can have as a game play mechanic, so you can save yourself some work. Using LIDs won't work, so we will have to make a larger location, which will be able to track the unit, but introduces other problems as well. Four or maybe five by five pixel square should do it. You will need as many locations for each player as you have maximum ITs.

Next, we need to add in safeguards to prevent the tracker from malfunctioning. Let's start with a check for each location, if a player brings two locations to only one IT, we know that an IT stole another IT's location, and we need to re-attach it. This means you're going to have to use other players. We need to give all of the ITs not being tracked to a different player, then center one of the tracking locations to the only IT owned by this player. This player cannot own ITs.

But we can't change the owner of just one IT that is being tracked, so you should simply change them all to the different player, and give back the ones who have locations.

Additionally, there's a small chance that you could catch location stealing in the act, and have two ITs in one location. If this occurs then you must perform the above fix. And that's accurate tracking, now for our death exploding system:

It's not too difficult, actually. Just store data for each location about which locations have ITs in them. If there is no IT in the location the next cycle, boom. If there were two in the location the last trigger cycle, make sure you update the data after you apply the tracking fix.



None.

Mar 6 2012, 4:57 am Azrael Post #4



Assuming you could afford the locations, another system you could use is to have two locations on each Infested Terran, one just large enough to be able to follow the IT, and another slightly bigger to detect when a second IT is about to enter its range. Using this, you can force two ITs owned by the same player to stop or die or whatever you want when they attempt to come close enough to one another that it would disrupt the tracking system.

Main problems with this are that it uses twice as many locations, and that the units won't be able to get close to one another.

Another solution would be to simply use a different Zerg unit which a normal LID can track (Drone/Lurker/hero Defiler) and make it so it detonates by burrowing or dying.




Mar 6 2012, 5:01 am Sacrieur Post #5

Still Napping

Quote from Roy
2) Enforce a restriction to only allow each player to own at most 1 Infested Terran at a time.

I think this is your best option, personally.



None.

Mar 6 2012, 5:25 am Azrael Post #6



Quote from Sacrieur
Quote from Roy
2) Enforce a restriction to only allow each player to own at most 1 Infested Terran at a time.

I think this is your best option, personally.

As a player, I'd rather have 12+ ITs that stop in the event they attempt to hug each other :P




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
[2026-4-13. : 9:15 pm]
NudeRaider -- Vrael ranting still is though
Please log in to shout.


Members Online: akirasmith435, anoeth47