Staredit Network > Forums > SC2 Assistance > Topic: [Solved] Defeat conditions?
[Solved] Defeat conditions?
This topic is locked. You can no longer write replies here.
Aug 21 2010, 8:09 pm
By: Paratrooper508  

Aug 21 2010, 8:09 pm Paratrooper508 Post #1



This is pretty ridiculous that this editor is so complicated Ih ave to ask something that was super easy in StarEdit but...

how the fuck do I do something as simple as saying Current Player controls 0 buildings, end in defeat for Current player



None.

Aug 21 2010, 8:31 pm Temp Post #2



The reason you are having such difficulty with this is because some things are done very differently than SC1. In SC2 defeat triggers like the one you want are (more or less) built in, you just need to activate it. Using the Enable/Disable Melee Option For Player action should allow you to do want you want. Enable defeat for every player you want the defeat action to happen for.

To edit what prevents a defeat go into the data editor and look at a unit you want to prevent a player from being defeated. Under the flags setting there is a Prevent Defeat option. If this is checked then the unit will prevent the player from being defeated. By default all buildings have this flag checked.



None.

Aug 21 2010, 10:01 pm Sand Wraith Post #3

she/her

Code
defeat
   Events
       Unit - Any Unit dies
   Local Variables
   Conditions
       (Number of Living units in (Any units in (Entire map) owned by player (Owner of (Triggering unit)) matching Required: Prevent Defeat; Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 0
   Actions
       Game - End game in Defeat for player (Owner of (Triggering unit)) (Show dialogs, Show score screen)


Copy the above code and paste into the input box at http://vgshorts.com/BBCode/BBCode3.php . Hopefully, this post will help you understand GE a bit more.

In GE, the difference between an Event and a Condition, especially when compared to the old SC1 Conditions, are much more different, and some things that were easy to do in SC1 will require a bit more ingenuity to implement in SC2, but likewise, some things that were literally impossible with StarEdit can easily be done in GE, such as detecting when a unit is attacking or getting damaged.

But, yea, I had that exact same reaction a million times with WC3's WE. ;o




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-4-26. : 1:58 pm]
lil-Inferno -- ya
[2026-4-25. : 11:50 pm]
JamaL -- Glad to see SEN will never die. Kudos to whoever is paying the hosting fees these days!
[2026-4-25. : 3:37 pm]
NudeRaider -- (-.-,)
[2026-4-25. : 3:35 pm]
Zoan -- ;o I thought that was a monkey emote
[2026-4-25. : 3:34 pm]
Zoan -- :mods:
[2026-4-25. : 3:34 pm]
Zoan -- :mods"
[2026-4-25. : 3:20 pm]
NudeRaider -- Vrael
Vrael shouted: moderation? on SEN? in 2026? completely localized in anoeth47's topic? at this time of year?
boy, if you're not careful I'll moderate your sorry ass too!
[2026-4-25. : 3:06 pm]
RIVE -- Yyyes. Don't you see it?
[2026-4-25. : 2:11 pm]
Vrael -- moderation? on SEN? in 2026? completely localized in anoeth47's topic? at this time of year?
[2026-4-25. : 1:39 pm]
NudeRaider -- anoeth47
anoeth47 shouted: Can I get a moderator/lord of the forum to clean up my topics - delete posts not really part of the topic.
send me the links of the posts you want deleted via pm
Please log in to shout.


Members Online: anoeth47, RIVE, DarkenedFantasies