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.
[03:35 pm]
Symmetry -- though mine's probably worse
[03:35 pm]
Symmetry -- That certainly sounds similar to what I've made
[06:28 am]
Ultraviolet -- sounds like Bound & Defend
[07:43 pm]
Symmetry -- If you take the reins you damn well be ready to ride
[2026-5-23. : 2:46 pm]
NudeRaider -- you wish
[2026-5-23. : 12:43 am]
IskatuMesk -- Ah, so Reindeer Breeding 3: BDSM edition.
[2026-5-22. : 12:45 am]
Moose -- tbh
[2026-5-20. : 8:27 pm]
Symmetry -- It's a bound map where you cross obstacles to earn units to defend your base
[2026-5-20. : 8:16 pm]
Symmetry -- No, the world isn't ready for that
[2026-5-20. : 5:11 pm]
Zoan -- Reindeer Breeding 3?
Please log in to shout.


Members Online: Symmetry