Staredit Network > Forums > SC2 Assistance > Topic: [Solved] How do i recreate the this "Melee" trigger?
[Solved] How do i recreate the this "Melee" trigger?
This topic is locked. You can no longer write replies here.
Jan 14 2011, 7:26 pm
By: thegameplayer  

Jan 14 2011, 7:26 pm thegameplayer Post #1



Since the 1.2 patch messed up my hero leveling, i need to delete one of the melee triggers. But i need it, can someone help me recreate the "Melee - Set Default Options for All Players"?



None.

Jan 14 2011, 8:07 pm Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

What has that melee trigger to do with your hero leveling?




Jan 14 2011, 8:08 pm thegameplayer Post #3



That melee action prevents my hero from gaining xp through veterancy, this only happened after the patch.



None.

Jan 16 2011, 5:14 pm Roy Post #4

An artist's depiction of an Extended Unit Death

Quote from thegameplayer
That melee action prevents my hero from gaining xp through veterancy, this only happened after the patch.
Was this an actual 'fix' made by Blizzard or a side-effect of the patch?

If the latter, I'd just post on the Battle.net forums notifying them of this problem and it will be resolved in a new patch.




Jan 16 2011, 6:24 pm thegameplayer Post #5



It was a side-effect of the patch. I don't really want to wait for a new patch. Do you know how to make a trigger that lets team 1 win if team 2 loses all their building, and vice-versa?



None.

Jan 16 2011, 7:35 pm Ahli Post #6

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

A trigger for that would be something like this. At least you should get the general idea.

Event: any unit dies
C: if it was a building (it may be called filter what you need)
A:
if( Count of units in region(buildings in area for team ...) == 0)
then - end game for team 2 in defeat.

I really need to install the EnGB version to learn the English editor texts :S

Anyway, if the problem is that the game doesn't end if the last building died, one of the units may have marked that they prevent the end of the game in the data editor. But I can't find it anymore... in the beta it was there... maybe I can't identify it because of poor localization :S




Jan 16 2011, 10:38 pm thegameplayer Post #7



I get the idea, but i cant find "Counts of units in region" and in end game for "team", it only says player. Can you do the whole trigger for me?



None.

Jan 16 2011, 11:29 pm Ahli Post #8

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

You should definitely check all units flag for the "Prevents Defeat" and try to use the default trigger.

Anyway this trigger should work. My translations might be different from what the English editor writes.
Press CTRL + D to change the view of the triggers (text & raw data).
Code
CustomWinLossTrigger
   Events
       TriggerAddEventUnitDied(null)
   Local Variables
       unitgroup = (UnitGroupEmpty()) <unitgroup>
       i = 0 <int>
   Conditions
       Comparison((UnitFilterMatch((EventUnit()),(EventPlayer()),Requires: buildings; excluded: projectiles, hidden)),==,true)
   Actions
       SetVariable(unitgroup,(UnitGroupAlliance((EventPlayer()),c_unitAllianceAlly,(RegionEntireMap()),required: buildings; excluded: projectiles, Tot, hidden,1)))
       IfThenElse()
           if
               Comparison((UnitGroupCount(unitgroup,c_unitCountAlive)),==,0)
           then
               ------- 1 to teamcount (e.g. 2... 16 should cover everything)
               ForEachInteger(i,1,16,1)
                   actions
                       IfThenElse()
                           if
                               Comparison((PlayerGroupHasPlayer((GameAttributePlayersForTeam(i)),(EventPlayer()))),==,true)
                           then
                               PickEachPlayerInGroup((GameAttributePlayersForTeam(i)))
                                   actions
                                       GameOver((PlayerGroupLoopCurrent()),c_gameOverDefeat,true,true)
                           else
                               PickEachPlayerInGroup((GameAttributePlayersForTeam(i)))
                                   actions
                                       GameOver((PlayerGroupLoopCurrent()),c_gameOverVictory,true,true)
           else





Jan 16 2011, 11:39 pm Roy Post #9

An artist's depiction of an Extended Unit Death

I typed up a very similar way to do this.

DefeatTrigger
    Events
        Unit - Any Unit dies
    Local Variables
        Team1 = (Players on team 1) <Player Group>
        Team2 = (Players on team 2) <Player Group>
        Team1Group = (Empty unit group) <Unit Group>
        Team2Group = (Empty unit group) <Unit Group>
    Conditions
        ((Unit type of (Triggering unit)) has Structure attribute) == true
    Actions
        Player Group - Pick each player in Team1 and do (Actions)
            Actions
                Unit Group - Add all units in (Any units in (Entire map) owned by player (Picked player) matching Required: Structure; Excluded: Missile, Dead, Hidden, with at most Any Amount) to Team1Group
        Player Group - Pick each player in Team2 and do (Actions)
            Actions
                Unit Group - Add all units in (Any units in (Entire map) owned by player (Picked player) matching Required: Structure; Excluded: Missile, Dead, Hidden, with at most Any Amount) to Team2Group
        General - If (Conditions) then do multiple (Actions)
            If Then Else
                General - Else if (Conditions) then do (Actions)
                    Else If
                        (Number of Living units in Team1Group) <= 0
                    Then
                        Player Group - Pick each player in Team1 and do (Actions)
                            Actions
                                Game - End game in Defeat for player (Picked player) (Show dialogs, Show score screen)
                        Player Group - Pick each player in Team2 and do (Actions)
                            Actions
                                Game - End game in Victory for player (Picked player) (Show dialogs, Show score screen)
                General - Else if (Conditions) then do (Actions)
                    Else If
                        (Number of Living units in Team2Group) <= 0
                    Then
                        Player Group - Pick each player in Team1 and do (Actions)
                            Actions
                                Game - End game in Victory for player (Picked player) (Show dialogs, Show score screen)
                        Player Group - Pick each player in Team2 and do (Actions)
                            Actions
                                Game - End game in Defeat for player (Picked player) (Show dialogs, Show score screen)




Jan 17 2011, 1:55 am thegameplayer Post #10



Thank you both for replying. I used Roy's way and it works perfectly. Thanks a lot, no one from sc2mapster helped me on this. How do i make this thread "Solved"?



None.

Jan 17 2011, 2:06 am Ahli Post #11

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

You can report it and write solved or something like that. Then some moderator will close it.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:18 am]
Sylph-Of-Space -- No complaints here, i'm just curious!
[11:05 pm]
Ultraviolet -- :wob:
[03:55 pm]
Zoan -- :wob:
[10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[2024-5-18. : 3:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
Please log in to shout.


Members Online: Sylph-Of-Space