• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] I have a new map. And for some reason the -kill mode is bugged. (GUI)

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
This is how the trigger looks. The thing is. When i choose for example. -50 kills then when first team who get 50 kills togheter as team they win. And now the problem is. When i play my team got 30 kills then after some time we had 6 kills? so from 30 to 6 on just some seconds. So its some kind of bugg. Its goes like this for both teams. I hope some one could help me out here and locate the bugg.

Mybe its more simple if i send you the map so you can check.

  • Choose kill limits
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
    • Conditions
    • Actions
      • Set KILLS_COUNT = (Integer((Substring((Entered chat string), 2, 10))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KILLS_COUNT Less than 2
        • Then - Actions
        • Else - Actions
          • -------- Set triggers on --------
          • Game - Display to (All players) for 1.00 seconds the text: (The host choose that the limit of kills is : + (String(KILLS_COUNT)))
          • Trigger - Run Countdown <gen> (ignoring conditions)
          • Trigger - Turn on HeroDies <gen>
          • Trigger - Turn on Money Income All Players <gen>
          • Trigger - Turn off Deathmatch Mode <gen>
          • Trigger - Turn off (This trigger)
  • Add to kills
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to The Butcher
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Dying unit)) Equal to Player 1 (Red)) or (((Owner of (Dying unit)) Equal to Player 2 (Blue)) or (((Owner of (Dying unit)) Equal to Player 3 (Teal)) or (((Owner of (Dying unit)) Equal to Player 4 (Purple)) or ((Owner of (Dying unit)) Equal to Player 5 (Yellow)))))
        • Then - Actions
          • Set Malh_Team_Kills[2] = (Malh_Team_Kills[2] + 1)
          • Game - Display to (All players) the text: (The team 2 got : + ((String(Malh_Team_Kills[2])) + kills))
          • Multiboard - Set the text for MainMultiboard item in column 3, row PlayerMBSlot to (String(Malh_Team_Kills[2]))
          • Multiboard - Set the text for MainMultiboard item in column 4, row PlayerMBSlot to (String(Malh_Team_Kills[1]))
        • Else - Actions
          • Set Malh_Team_Kills[2] = (Malh_Team_Kills[2] + 1)
          • Game - Display to (All players) the text: (The team 2 got : + ((String(Malh_Team_Kills[2])) + kills))
          • Multiboard - Set the text for MainMultiboard item in column 3, row PlayerMBSlot to (String(Malh_Team_Kills[2]))
          • Multiboard - Set the text for MainMultiboard item in column 4, row PlayerMBSlot to (String(Malh_Team_Kills[1]))
      • Set Malh_Player_Kills[(Player number of (Owner of (Killing unit)))] = (Malh_Player_Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Multiboard - Set the text for MainMultiboard item in column 3, row (Player number of (Owner of (Killing unit))) to (String(Malh_Player_Kills[(Player number of (Owner of (Killing unit)))]))
      • Set Malh_Player_Death[(Player number of (Owner of (Dying unit)))] = (Malh_Player_Death[(Player number of (Owner of (Dying unit)))] + 1)
      • Multiboard - Set the text for MainMultiboard item in column 4, row (Player number of (Owner of (Killing unit))) to (String(Malh_Player_Death[(Player number of (Owner of (Dying unit)))]))
  • Win Team 1
    • Events
      • Unit - A unit Dies
    • Conditions
      • Malh_Team_Kills[1] Equal to KILLS_COUNT
    • Actions
      • Trigger - Turn off Win Team 2 <gen>
      • Trigger - Turn off (This trigger)
      • Set All_Allies = (All allies of Player 1 (Red))
      • Set AllEnemies = (All enemies of Player 1 (Red))
      • Player Group - Pick every player in All_Allies and do (Actions)
        • Loop - Actions
          • Game - Victory (Picked player) (Show dialogs, Show scores)
      • Player Group - Pick every player in AllEnemies and do (Actions)
        • Loop - Actions
          • Game - Defeat (Picked player) with the message: Defeat!
      • Custom script: call DestroyForce(udg_AllEnemies)
      • Custom script: call DestroyForce(udg_All_Allies)
      • Floating Text - Create floating text that reads Game Over! at (Center of Arena <gen>) with Z offset 50.00, using font size 30.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
  • Win Team 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • Malh_Team_Kills[2] Equal to KILLS_COUNT
    • Actions
      • Trigger - Turn off Win Team 1 <gen>
      • Trigger - Turn off (This trigger)
      • Set All_Allies = (All allies of Player 1 (Red))
      • Set AllEnemies = (All enemies of Player 1 (Red))
      • Player Group - Pick every player in AllEnemies and do (Actions)
        • Loop - Actions
          • Game - Victory (Picked player) (Show dialogs, Show scores)
      • Player Group - Pick every player in All_Allies and do (Actions)
        • Loop - Actions
          • Game - Defeat (Picked player) with the message: Defeat!
      • Custom script: call DestroyForce(udg_AllEnemies)
      • Custom script: call DestroyForce(udg_All_Allies)
      • Floating Text - Create floating text that reads Game Over! at (Center of Arena <gen>) with Z offset 50.00, using font size 30.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
 
Last edited:
In your first second trigger you use many Or - Conditions, you can simply use integer comparrison "Player number of Player < 6"

In same trigger in your IfThenElse block, the Then & Else actions are equal, I guess you just copied and forgot to change it for other team.

Still in very first second trigger in very last multiboard action, you once use Owner of 'killing unit', which should be 'dying unit'.
___________________

Nice one, even Player1 team got less kills, it wins in both trigger :d.. you defeat wrong team in your second Win-trigger.
Also dont use two seperated trigger, use only one + If/Then/Else block.

Try to fix all, test again.. if it doesnt work also post your other triggers, which are affected (in your first trigger).
 
Don't use dying unit use triggering unit.
Use hidden tags you are stretching the page.
Anything used twice or more should be stored in a variable and the variable should be used.
You leak locations in your triggers.
What iceman said should fix the problem.
Also in your Choose Kills limit trigger you should use 2, Length of entered string not 2,10 for the substring.
You can also simply get rid of that and in your condition use length of entered string less than 2
 
Status
Not open for further replies.
Top