7
\$\begingroup\$

I'm working with Starcraft 2 Map Editor, and am having a little bit of a trigger problem.

It's quite easy to detect when a specific unit kills a structure (simply check if triggering unit == whatever) but I'm not quite sure how to tell when a building dies to to either fire (terran buildings) or bleeding out (zerg buildings when off creep).

What condition should I be looking for in my "a unit dies" trigger to see if one of those two situations occured?

PS: Sorry for lack of available tags!

\$\endgroup\$
6
  • 1
    \$\begingroup\$ This seems better for the gaming SE maybe? Its a fine line, but there might be more expertise over there. \$\endgroup\$
    – coderanger
    Commented Aug 24, 2010 at 3:19
  • 1
    \$\begingroup\$ Should be at gaming.stackexchange.com \$\endgroup\$ Commented Aug 24, 2010 at 3:48
  • 6
    \$\begingroup\$ Noctrine, the community there has said it's not on topic for them: meta.gaming.stackexchange.com/questions/562/… and the discussion on our meta points to yes: meta.gamedev.stackexchange.com/questions/58/…, reopening. \$\endgroup\$
    – Tetrad
    Commented Aug 24, 2010 at 4:24
  • \$\begingroup\$ @Tetrad, it feels so weird. But after reading the gaming communities thread I agree. \$\endgroup\$ Commented Aug 24, 2010 at 4:34
  • 3
    \$\begingroup\$ "Use map settings" from SC1 and now Custom maps on SC2 is a real game development community that have innovated in a lot of game-plays. I don't see why this would be off-topic. \$\endgroup\$
    – DFectuoso
    Commented Aug 26, 2010 at 5:58

2 Answers 2

4
\$\begingroup\$

There is a behavior for Terran buildings that applies the burning effect periodically if the building's health is below 1/3. To see if a building is killed by this effect, you could do this:

Events
    Unit - Any Unit takes Fatal Any damage (from Any effects)
Local Variables
Conditions
    (Damaging effect) == BurndownDamage (Unnamed)
    (Unit type of (Triggering unit)) == <building>

Edit: I forgot the zerg building part, but it's exactly the same but with a different effect:

    (Damaging effect) == ZergBuildingNotOnCreepDamage (Unnamed)
\$\endgroup\$
2
  • \$\begingroup\$ Ha, how soon after my own answer did you post this? :P \$\endgroup\$ Commented Aug 27, 2010 at 1:26
  • \$\begingroup\$ I read the post and then opened the editor and looked it up, then typed up my reply and submitted it and saw yours there. So pretty much right after :P. \$\endgroup\$
    – BarakatX2
    Commented Aug 27, 2010 at 2:37
1
\$\begingroup\$

I've been poking around. I've determined that every terran building has an effect "Terran Burn Down" or some such, that I assume is what is actually causing the damage.

I'm not sure of the specifics, exactly, but I imagine one of two things should be possible:

  • The building counts as its own killer (because its death is related to an effect it 'owns')
  • The death can be tracked by attributing it to the effect, something along the lines of "Unit dies" Condition: Killing Effect == Terran Burn Down.

I imagine the zerg buildings have a similar 'requires creep' ability.

I'll keep investigating and keep this open in case someone can provide a fuller answer.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .