Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Best way to detect and handle a tie in scores
Best way to detect and handle a tie in scores
Feb 1 2014, 5:50 pm
By: Prophete  

Feb 1 2014, 5:50 pm Prophete Post #1



In the map score is displayed/tracked by minerals and gasses.

So let's assume the countdown timer is at 0:00 (After counting down from 20:00)

Team 1 has a score of 100
Team 2 has a score of 90

Obviously, team 1 is the winner.

Code
Trigger("Team 1"){
Conditions:
    Most Resources(ore);
    Countdown Timer(Exactly, 0);
    Elapsed Time(At least, 200);
    Command("Player 12", "Terran Flag Beacon", Exactly, 0);

Actions:
    Set Switch("Switch140", set);
    Preserve Trigger();
    Comment("Force1Winning");
}

//-----------------------------------------------------------------//


Code
Trigger("Team HOT"){
Conditions:
    Switch("Switch140", set);
    Switch("Switch141", not set);
    Countdown Timer(Exactly, 0);

Actions:
    Display Text Message(Always Display, "\x013\x005Team 1 wins!");
    Victory();
    Comment("Victory");
}

//-----------------------------------------------------------------//


And vice verse for a losing team.

Now, that seems to work fine, but I wan't an OT trigger as well, and it seems to break sometimes?

Code
Trigger("All players"){
Conditions:
    Countdown Timer(Exactly, 0);
    Elapsed Time(At least, 10);
    Switch("Switch140", set);
    Switch("Switch141", set);

Actions:
    Set Countdown Timer(Set To, 120);
    Set Switch("Switch41", set);
    Comment("SetOver-time");
}

//-----------------------------------------------------------------//


Code
Trigger("All players"){
Conditions:
    Switch("Switch41", set);

Actions:
    Set Switch("Switch41", clear);
    Comment("ClearOver-Time");
}

//-----------------------------------------------------------------//


Those two triggers are right on top of each other. In that order.



None.

Feb 1 2014, 6:45 pm jjf28 Post #2

Cartography Artisan

Does each team belong to a single force or do the minerals/gas belong to a single player?



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Feb 1 2014, 6:53 pm Prophete Post #3



Player's 1-3 belong to force 1 and Player's 4-6 belong to force 2



None.

Feb 1 2014, 10:36 pm jjf28 Post #4

Cartography Artisan

Trigger
Players
  • Force 1
  • Conditions
  • Deaths ( Current Player, Cantina, at least 1 )
  • Deaths ( Force 2, Cantina, exactly, 0 )
  • Actions
  • Victory


  • Trigger
    Players
  • Force 2
  • Conditions
  • Deaths ( Current Player, Cantina, at least 1 )
  • Deaths ( Force 1, Cantina, exactly, 0 )
  • Actions
  • Victory


  • Trigger
    Players
  • All Players
  • Conditions
  • Deaths ( All Players, Cantina, at least, 1 )
  • Deaths ( Current Player, Cantina, exactly 0 )
  • Actions
  • Defeat


  • Trigger
    Players
  • Force 1
  • Conditions
  • Deaths ( Current Player, Cantina, at least 1 )
  • Deaths ( Force 2, Cantina, at least, 1 )
  • Actions
  • Tie


  • Trigger
    Players
  • Force 2
  • Conditions
  • Deaths ( Current Player, Cantina, at least 1 )
  • Deaths ( Force 1, Cantina, at least, 1 )
  • Actions
  • Tie


  • Trigger
    Players
  • Force 1
  • Force 2
  • Conditions
  • Most Resources
  • Actions
  • Set Deaths ( Current Player, Cantina, add, 1 )


  • Keep in mind that triggers run like this:

    - set current player to p1
        - run first trigger (run once if owned by p1, once more (or for the first time) if owned by p1's force, and once more (or for the first/second time) if it's owned by all players)
        - run second trigger (...)
        ...
    - set current player to p2
        - run first trigger (...)
        - run second trigger (...)
        ...
    ... and on till p8

    Post has been edited 1 time(s), last time on Feb 2 2014, 6:23 pm by jjf28.



    TheNitesWhoSay - Clan Aura - github

    Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

    Feb 2 2014, 2:46 pm Prophete Post #5



    Okay, I understand how that could work but sadly all players are set to allies for the whole game. For that reason, the Foes trigger cannot work. Is it possible just to replace that with "Force 1" and "Force 2" ?

    And as for the tie, I assume I can just set preserve triggers on these, and on the tie one I set Cantina to 0 after I reset the timer for OT?



    None.

    Feb 2 2014, 6:26 pm jjf28 Post #6

    Cartography Artisan

    Edited to reflect alliances

    Quote
    And as for the tie, I assume I can just set preserve triggers on these, and on the tie one I set Cantina to 0 after I reset the timer for OT?

    Should be able to



    TheNitesWhoSay - Clan Aura - github

    Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [04:56 am]
    Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
    [04:26 am]
    Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
    [04:25 am]
    Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
    [06:15 pm]
    Ultraviolet -- Yeah he's talked about a lot of that stuff in his casts before. It seems plausible. Especially knowing how Blizzard of yesteryear operated.
    [03:47 pm]
    NudeRaider -- to clarify: couldn't recall the behavior for every single Protoss building but I was aware the disparity exists.
    [03:43 pm]
    NudeRaider -- Contained nothing new for me. Didn't know all building's behavior, but very much all unit's. Also Terran balance whine - also nothing new :lol:
    [2026-6-19. : 9:57 am]
    Oh_Man -- makes me wonder if SEN knows anything about the topic
    [2026-6-19. : 9:57 am]
    Oh_Man -- artosis dropped pretty interesting vid: https://youtu.be/EqZHB8Blra4
    [2026-6-18. : 5:01 pm]
    Ultraviolet -- :wob:
    [2026-6-17. : 6:15 am]
    RexyRex -- :wob:
    Please log in to shout.


    Members Online: MarineElite