1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] What just go wrong :'( Please check and help, will rep and thank

Discussion in 'Triggers & Scripts' started by Weigazod, Jun 8, 2016.

  1. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0
    • Defeat
      • Events
        • Unit - A unit Dies
      • Conditions
        • ((Triggering unit) is A structure) Equal to True
        • (Real((Count structures controlled by (Owner of (Dying unit)) (Exclude incomplete structures)))) Equal to 0.00
      • Actions
        • Game - Defeat (Owner of (Dying unit)) with the message: Defeat!






    • Victory
      • Events
        • Unit - A unit Dies
      • Conditions
        • ((Triggering unit) is A structure) Equal to True
        • (Real((Number of units in (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of (Killing unit))) Equal to True)))))) Equal to 0.00
      • Actions
        • Set WinTeam = (All enemies of (Owner of (Triggering unit)))
        • Player Group - Pick every player in WinTeam and do (Actions)
          • Loop - Actions
            • Game - Victory (Picked player) (Show dialogs, Show scores)


    I try to make my own version of victory and defeat condition for my custom race altered melee map but it just don't go as supposed. The trigger randomly gives a victory whenever it feels like, disregards any condition and event :'(.

    I am now not very sure about the defeat condition either. Someone please help.
     
  2. T77df

    T77df

    Joined:
    Sep 15, 2015
    Messages:
    184
    Resources:
    0
    Resources:
    0
    Maybe you should use "dying unit" Instead of "Triggering unit". maybe
    ((Don't kill me if that is wrong))
     
  3. DracoL1ch

    DracoL1ch

    Joined:
    Dec 12, 2010
    Messages:
    1,755
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    synonims
     
  4. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0
    So it's still a no?
     
  5. T77df

    T77df

    Joined:
    Sep 15, 2015
    Messages:
    184
    Resources:
    0
    Resources:
    0
    Did you test it?
    Is it answer or question?
     
  6. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0
    Yep, still get victory at 1x mins mark.
     
  7. Warseeker

    Warseeker

    Joined:
    Feb 18, 2014
    Messages:
    2,468
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Fixed for you ^^ try now!
     
  8. T77df

    T77df

    Joined:
    Sep 15, 2015
    Messages:
    184
    Resources:
    0
    Resources:
    0
    45.PNG
    use this condition.
     
  9. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0
    It didn't work :'(


    Thanks but the defeat condition is working fine but i will change into that. However, the problem is still there, i have no winning condition.
     
  10. T77df

    T77df

    Joined:
    Sep 15, 2015
    Messages:
    184
    Resources:
    0
    Resources:
    0
    Triggers
    • Melee Initialization
      • Events
        • Unit - A unit Dies
      • Conditions
        • ((Dying unit) is A structure) Equal to True
        • (Count structures controlled by (Owner of (Dying unit)) (Exclude incomplete structures)) Equal to 0
      • Actions
        • Game - Defeat (Owner of (Dying unit)) with the message: Defeat!
        • Player Group - Pick every player in (All allies of (Owner of (Dying unit))) and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Count structures controlled by (Owner of (Picked unit)) (Exclude incomplete structures)) Greater than 0
              • Then - Actions
                • Set All_Dead = False
              • Else - Actions
                • Player Group - Pick every player in (All enemies of (Owner of (Dying unit))) and do (Actions)
                  • Loop - Actions
                    • Game - Victory (Picked player) (Show dialogs, Show scores)

    It's working I tested it. Victory and defeat!!
     
  11. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0
    I hope it will work in 1v1v1v1 or 2v2 or 2v2v2
     
  12. T77df

    T77df

    Joined:
    Sep 15, 2015
    Messages:
    184
    Resources:
    0
    Resources:
    0
    No . Just working with 2 team.
     
  13. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0
    Then that is the problem. My map offers 8 players.
     
  14. Warseeker

    Warseeker

    Joined:
    Feb 18, 2014
    Messages:
    2,468
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Use interger then.
     
  15. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0
    I don't understand
     
  16. blancfaye7

    blancfaye7

    Joined:
    May 21, 2014
    Messages:
    560
    Resources:
    1
    Maps:
    1
    Resources:
    1
    This line is a problem. It will give a victory to ALL players who are enemies with the team being defeated, regardless if the said players are allies or enemies; thus giving a victory to all even without killing each other off. It invokes when at least one team loses.

    Your defeat trigger has flaws also if you are trying to recreate the melee defeat condition. A player gets defeated when his team lost all structures, not only his own structures.

    Also, your defeat and victory conditions don't cover everything yet (if you are trying to recreate normal melee conditions). You also have to check when a player cancels a structure, because if a player has an unfinished structure and cancels it, and he has no structures, then that player won't be defeated.

    Also, again, if you are trying to recreate melee conditions, you need to include unfinished structures in counting.
     
  17. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0

    In normal melee game, A player will get defeat when he lose all of his construction, not when his team lost all construction. He will then have to click quit campaign. When all players in the team quit the game, the team is no more.

    In a 3 teams fight, when there is only 2 team remain in the game and one of the 2 team destroy all structure of the last player of the other team. The victory goes to the enemies of the team get destroyed since at this time only 2 team are left in the game, even if the trigger make all enemies of the other team win, the other players of the third team aren't there so there is no problem.

    Since i make the condition say count all buildings of enemies of the killing team, it should include all enemies from 2 other teams.

    The defeat condition literally means that it counts all building of a player but does not count their unfinished buildings. if they have 0 finished building and 2 unfinished building it will still count as 0 and then give them a defeat message.

    That was my idea when i create the trigger. There must be something wrong in the condition, making the mechanism read it differently. :(
     
    Last edited: Jun 8, 2016
  18. blancfaye7

    blancfaye7

    Joined:
    May 21, 2014
    Messages:
    560
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Are you sure? This is not the case after playing several melee games.

    -----
    • Defeat
      • Events
      • Unit - A unit Dies
      • Conditions
      • ((Triggering unit) is A structure) Equal to True
      • (Real((Count structures controlled by (Owner of (Dying unit)) (Exclude incomplete structures)))) Equal to 0.00
      • Actions
      • Game - Defeat (Owner of (Dying unit)) with the message: Defeat!


    Include Incomplete structures. Trust me. I've played more melee games than you'd ever imagine. (If you want to follow the normal melee defeat conditions.)

    • Victory
    • Events
    • Unit - A unit Dies
    • Conditions
    • ((Triggering unit) is A structure) Equal to True
    • (Real((Number of units in (Units in (Playable map area) matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of (Killing unit))) Equal to True)))))) Equal to 0.00
    • Actions
    • Set WinTeam = (All enemies of (Owner of (Triggering unit)))
    • Player Group - Pick every player in WinTeam and do (Actions)
    • Loop - Actions
    • Game - Victory (Picked player) (Show dialogs, Show scores)


    Reviewing your triggers, it should work. Let me check more on hands-on...

    Can you pinpoint exactly how it ends?
     
  19. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0
    This is a replay. It ends without any specific event.
     

    Attached Files:

    • h.w3g
      File size:
      70.1 KB
      Views:
      64
  20. blancfaye7

    blancfaye7

    Joined:
    May 21, 2014
    Messages:
    560
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I need the map file to play the replay tho... Send me the map via PM.