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!

  • 1
    \$\begingroup\$ This seems better for the gaming SE maybe? Its a fine line, but there might be more expertise over there. \$\endgroup\$ – coderanger Aug 24 '10 at 3:19
  • 1
    \$\begingroup\$ Should be at gaming.stackexchange.com \$\endgroup\$ – Jesse Dorsey Aug 24 '10 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 Aug 24 '10 at 4:24
  • \$\begingroup\$ @Tetrad, it feels so weird. But after reading the gaming communities thread I agree. \$\endgroup\$ – Jesse Dorsey Aug 24 '10 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 Aug 26 '10 at 5:58

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:

    Unit - Any Unit takes Fatal Any damage (from Any effects)
Local Variables
    (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)
| improve this answer | |
  • \$\begingroup\$ Ha, how soon after my own answer did you post this? :P \$\endgroup\$ – Raven Dreamer Aug 27 '10 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 Aug 27 '10 at 2:37

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.