Text not showing

Level 3
Joined
Apr 6, 2012
Messages
22
Hello again :)

I seem to have a problem with the following kill trigger from my map:

  • Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) is an illusion) Equal to False
      • (Owner of (Killing unit)) Not equal to Player 6 (Orange)
      • (Owner of (Killing unit)) Not equal to Player 12 (Brown)
      • (Owner of (Killing unit)) Not equal to Neutral Hostile
      • (Owner of (Killing unit)) Not equal to Neutral Passive
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Killing unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
        • Then - Actions
          • -------- Calculate gold for kill: --------
          • Set Kill_Gold = (250 + (50 x PlayerKillStreak[(Player number of (Owner of (Triggering unit)))]))
          • -------- Kill announcement text: --------
          • Game - Display to (All players) the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + ( has annihilated + (PlayerFullName[(Player number of (Owner of (Triggering unit)))] + ( for + ((String(Kill_Gold)) + gold.)))))
          • -------- Give gold: --------
          • Player - Add Kill_Gold to (Owner of (Killing unit)) Current gold
          • -------- Floating text to show how much gold was gotten: --------
          • Floating Text - Create floating text that reads (String(Kill_Gold)) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 84.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • -------- Show floaty text only to killing player: --------
          • Set Temp_PGroup = (All players)
          • Floating Text - Hide (Last created floating text) for Temp_PGroup
          • Custom script: call DestroyForce(udg_Temp_PGroup)
          • Set Temp_PGroup = (Player group((Owner of (Killing unit))))
          • Floating Text - Show (Last created floating text) for Temp_PGroup
          • Custom script: call DestroyForce(udg_Temp_PGroup)
          • -------- Calculate multikill and start multikill timer for killer: --------
          • Set PlayerMultiKill[(Player number of (Owner of (Killing unit)))] = (PlayerMultiKill[(Player number of (Owner of (Killing unit)))] + 1)
          • Set PlayerMultiKill_InProgress[(Player number of (Owner of (Killing unit)))] = True
          • Countdown Timer - Start PlayerMultiKill_Timer[(Player number of (Owner of (Killing unit)))] as a One-shot timer that will expire in 60.00 seconds
          • -------- Calculate kill streak for killer: --------
          • Set PlayerKillStreak[(Player number of (Owner of (Killing unit)))] = (PlayerKillStreak[(Player number of (Owner of (Killing unit)))] + 1)
          • -------- Reset victim's kill streak: --------
          • Set PlayerKillStreak[(Player number of (Owner of (Triggering unit)))] = 0
          • -------- First Blood Announcer: --------
          • Set Temp_PGroup = (All players)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FirstBlood_Passed Equal to False
            • Then - Actions
              • Set FirstBlood_Passed = True
              • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + has |c00FF0000FIRST BLOOD|r!)
              • Player - Add 100 to (Owner of (Killing unit)) Current gold
              • Sound - Play Announcer_Sounds[5]
            • Else - Actions
          • -------- Kill Streak Announcer: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 10
            • Then - Actions
              • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + is |c00640000GODLIKE|r!)
              • Sound - Play Announcer_Sounds[9]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 8
                • Then - Actions
                  • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + is |c00FF0000UNSTOPPABLE|r!)
                  • Sound - Play Announcer_Sounds[8]
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 5
                    • Then - Actions
                      • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + is a |c00FF7F00Killing Machine|r!)
                      • Sound - Play Announcer_Sounds[7]
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
                        • Then - Actions
                          • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + is on a |c0096FF96Killing Spree|r!)
                          • Sound - Play Announcer_Sounds[6]
                        • Else - Actions
          • -------- Multikill Announcer: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerMultiKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to 5
            • Then - Actions
              • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + has |c00FF0000ERADICATED|r his enemies!)
              • Sound - Play Announcer_Sounds[4]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PlayerMultiKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to 4
                • Then - Actions
                  • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + has a |c00FF0000Multi-Kill|r!)
                  • Sound - Play Announcer_Sounds[3]
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • PlayerMultiKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
                    • Then - Actions
                      • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + has a |c00FF0000Triple Kill|r!)
                      • Sound - Play Announcer_Sounds[2]
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • PlayerMultiKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
                        • Then - Actions
                          • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + has a |c00FF0000Double Kill|r!)
                          • Sound - Play Announcer_Sounds[1]
                        • Else - Actions
          • Custom script: call DestroyForce(udg_Temp_PGroup)
        • Else - Actions
          • Game - Display to (All players) the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + ( has denied + (PlayerFullName[(Player number of (Owner of (Triggering unit)))] + !)))
(Thank god I found out how to just copy the trigger as text... I was not typing that out.)

The problem seems to be with the announcer parts of the trigger. While they seem to work in that the announcer does talk and say the right announcement, the text that is supposed to come along with it does not show up! I'm not quite sure why.

Oh and if you see anything else that is wrong with this trigger, feel free to mention it as I know there's bound to be some stupid stuff in there.
 
Last edited:
Level 3
Joined
Apr 6, 2012
Messages
22
Game messages.

Actually, I haven't even checked if the floating text shows up. Let me test that and I'll edit this post.

EDIT: Floating text does show up. However, I've just noticed that 1 game message does show up: The very first one ("PlayerFullName[...] has annihilated PlayerFullName[...] for Kill_Gold gold"). However, it only seems to show up on the very first kill I make, and then never shows up again... Weird.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Game messages.

Actually, I haven't even checked if the floating text shows up. Let me test that and I'll edit this post.

EDIT: Floating text does show up. However, I've just noticed that 1 game message does show up: The very first one ("PlayerFullName[...] has annihilated PlayerFullName[...] for Kill_Gold gold"). However, it only seems to show up on the very first kill I make, and then never shows up again... Weird.

the problem maybe the length of the trigger, each trigger has limits, when they reach limits, the action that passed the limit won't be triggered at all.

you need to separate the triggers.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerMultiKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
    • Then - Actions
      • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + has a |c00FF0000Triple Kill|r!)
      • Sound - Play Announcer_Sounds[2]
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerMultiKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
    • Then - Actions
      • Game - Display to Temp_PGroup the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + has a |c00FF0000Double Kill|r!)
      • Sound - Play Announcer_Sounds[1]
    • Else - Actions
why those two if's has the same condition ?

and hey, you could do this with a loop instead of checking it one by one.
 
Last edited:

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
If ur problem is what Venomous said, try to split them into 2 trigger and allow 1 of them to run another.
P/S: Can u use [hide][/hide] to hide ur trigger plz since it is too long?
 
Level 3
Joined
Apr 6, 2012
Messages
22
Ah, the second if was meant to say "Greater than or equal to 2". Thanks for pointing that out.

I'm going to try to make it work with a loop instead, that should fix length problems too, right?

And I hid the main post, sorry :p
 
Level 27
Joined
Jan 26, 2007
Messages
4,788
It's probably because of this:
  • Set Temp_PGroup = (All players)
  • Custom script: call DestroyForce(udg_Temp_PGroup)
The force "All Players" is a variable inside the map already, so it shouldn't be removed.
If you do remove it (as you did), then you will never be able to use it again.
Since it's a constant variable, it doesn't leak either.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Ah, the second if was meant to say "Greater than or equal to 2". Thanks for pointing that out.

I'm going to try to make it work with a loop instead, that should fix length problems too, right?

And I hid the main post, sorry :p

here is an example on how would i loop it.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set PlayerKill[(Player number of (Owner of (Killing unit)))] = (PlayerKill[(Player number of (Owner of (Killing unit)))] + 1)
      • Set Text[1] = 1
      • Set Text[2] = 2
      • Set Text[3] = 3
      • Set Text[4] = 4
      • Set Sound[1] = (Last played sound)
      • Set Sound[2] = (Last played sound)
      • Set Sound[3] = (Last played sound)
      • Set Sound[4] = (Last played sound)
      • For each (Integer IntegerVariable) from 1 to 4, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerKill[(Player number of (Owner of (Killing unit)))] Equal to (IntegerVariable + 1)
            • Then - Actions
              • Sound - Play Sound[IntegerVariable]
              • Game - Display to (All players) the text: Text[IntegerVariable]
            • Else - Actions
better than ITE's block, no ? ;p

P.S the sound should be in Map Initialization, but the text still need to be in this trigger.
 
Level 3
Joined
Apr 6, 2012
Messages
22
I managed to fix it, it seems like ap0calypse's solution did it :)
Here's the new trigger, for anyone interested:
  • Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Triggering unit) is an illusion) Equal to False
      • (Owner of (Killing unit)) Not equal to Player 6 (Orange)
      • (Owner of (Killing unit)) Not equal to Player 12 (Brown)
      • (Owner of (Killing unit)) Not equal to Neutral Hostile
      • (Owner of (Killing unit)) Not equal to Neutral Passive
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Killing unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
        • Then - Actions
          • Set Kill_Gold = (250 + (50 x PlayerKillStreak[(Player number of (Owner of (Triggering unit)))]))
          • Game - Display to (All players) the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + ( has annihilated + (PlayerFullName[(Player number of (Owner of (Triggering unit)))] + ( for + ((String(Kill_Gold)) + gold.)))))
          • Player - Add Kill_Gold to (Owner of (Killing unit)) Current gold
          • Floating Text - Create floating text that reads (String(Kill_Gold)) above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 84.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Hide (Last created floating text) for (All players)
          • Set Temp_PGroup = (Player group((Owner of (Killing unit))))
          • Floating Text - Show (Last created floating text) for Temp_PGroup
          • Custom script: call DestroyForce(udg_Temp_PGroup)
          • Set PlayerMultiKill[(Player number of (Owner of (Killing unit)))] = (PlayerMultiKill[(Player number of (Owner of (Killing unit)))] + 1)
          • Set PlayerMultiKill_InProgress[(Player number of (Owner of (Killing unit)))] = True
          • Countdown Timer - Start PlayerMultiKill_Timer[(Player number of (Owner of (Killing unit)))] as a One-shot timer that will expire in 60.00 seconds
          • Set PlayerKillStreak[(Player number of (Owner of (Killing unit)))] = (PlayerKillStreak[(Player number of (Owner of (Killing unit)))] + 1)
          • Set PlayerKillStreak[(Player number of (Owner of (Triggering unit)))] = 0
          • -------- First Blood Announcer: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FirstBlood_Passed Equal to False
            • Then - Actions
              • Set FirstBlood_Passed = True
              • Game - Display to (All players) the text: Announcer_Text[5]
              • Sound - Play Announcer_Sounds[5]
              • Player - Add 100 to (Owner of (Killing unit)) Current gold
            • Else - Actions
          • -------- Kill Streak Announcer: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
              • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 5
            • Then - Actions
              • Game - Display to (All players) the text: Announcer_Text[6]
              • Sound - Play Announcer_Sounds[6]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 5
              • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 8
            • Then - Actions
              • Game - Display to (All players) the text: Announcer_Text[7]
              • Sound - Play Announcer_Sounds[7]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 8
              • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 10
            • Then - Actions
              • Game - Display to (All players) the text: Announcer_Text[8]
              • Sound - Play Announcer_Sounds[8]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 10
            • Then - Actions
              • Game - Display to (All players) the text: Announcer_Text[9]
              • Sound - Play Announcer_Sounds[9]
            • Else - Actions
          • -------- Multikill Announcer: --------
          • For each (Integer A) from 2 to 4, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PlayerMultiKill[(Player number of (Owner of (Killing unit)))] Equal to (Integer A)
                • Then - Actions
                  • Game - Display to (All players) the text: Announcer_Text[((Integer A) - 1)]
                  • Sound - Play Announcer_Sounds[((Integer A) - 1)]
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PlayerMultiKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to 5
            • Then - Actions
              • Game - Display to (All players) the text: Announcer_Text[4]
              • Sound - Play Announcer_Sounds[4]
            • Else - Actions
        • Else - Actions
          • Game - Display to (All players) the text: (PlayerFullName[(Player number of (Owner of (Killing unit)))] + ( has denied + (PlayerFullName[(Player number of (Owner of (Triggering unit)))] + !)))
+repping all of you for your help :)

I do have one more question, however. The variable "PlayerFullName[]" is actually a string that works like so:
  • Set PlayerName[(Integer A)] = (PlayerColour[(Integer A)] + ((Name of (Player((Integer A)))) + |r))
  • Set PlayerFullName[(Integer A)] = (PlayerName[(Integer A)] + ( ( + (PlayerHeroName[(Integer A)] + ))))
And the variable "PlayerHeroName[]" gets set to the name of the player's hero when he picks it, like so:
  • Hero Pick
    • Events
      • Unit - A unit enters Hero Selector <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set PlayerHeroUnit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set PlayerHeroName[(Player number of (Owner of (Triggering unit)))] = (PlayerColour[(Player number of (Owner of (Triggering unit)))] + ((Proper name of (Triggering unit)) + |r))
(of course there's more than just those 2 lines to that trigger, but those are not required for my question).

My question being, is there anyway to turn the variable "PlayerFullName" into a dynamic(?) variable. By that I mean that if one of the values that it is made up of (eg. PlayerHeroName[]) is changed, the contents of the variable "PlayerFullName" themselves will change. It seems like right now, if PlayerHeroName changes then PlayerFullName for that player will stay with its previous value.
Is the only way to resolve that to change the value of PlayerFullName every time I change to value of one of its parts?

EDIT: Sorry ap0calypse, I can't seem to +rep you as I've recently +repped you from my previous problems :/
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
  • -------- Multikill Announcer: --------
  • For each (Integer A) from 2 to 4, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerMultiKill[(Player number of (Owner of (Killing unit)))] Equal to (Integer A)
        • Then - Actions
          • Game - Display to (All players) the text: Announcer_Text[((Integer A) - 1)]
          • Sound - Play Announcer_Sounds[((Integer A) - 1)]
        • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerMultiKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to 5
    • Then - Actions
      • Game - Display to (All players) the text: Announcer_Text[4]
      • Sound - Play Announcer_Sounds[4]
    • Else - Actions

you could do this using my method. and avoid of using Integer A, create a new integer variable and use that instead. one variable is enough for every loops you have (with the exception of multiple loops).

  • For each (Integer IntegerVariable) from 1 to 4, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerKill[(Player number of (Owner of (Killing unit)))] Equal to (IntegerVariable + 1)
        • Then - Actions
          • Sound - Play Sound[IntegerVariable]
          • Game - Display to (All players) the text: Text[IntegerVariable]
        • Else - Actions
it's less work, no ?

Is the only way to resolve that to change the value of PlayerFullName every time I change to value of one of its parts?

unfortunately, this is the only way to do it.
the string will remain if you just change some part of it

and i want to ask something.

  • If - Conditions
    • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
    • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 5
so when the player kill is 3 and 4, they will play the same sound ?

anyway, this trigger could be looped either.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 5
    • Then - Actions
      • Game - Display to (All players) the text: Announcer_Text[6]
      • Sound - Play Announcer_Sounds[6]
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 5
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 8
    • Then - Actions
      • Game - Display to (All players) the text: Announcer_Text[7]
      • Sound - Play Announcer_Sounds[7]
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 8
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 10
    • Then - Actions
      • Game - Display to (All players) the text: Announcer_Text[8]
      • Sound - Play Announcer_Sounds[8]
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 10
    • Then - Actions
      • Game - Display to (All players) the text: Announcer_Text[9]
      • Sound - Play Announcer_Sounds[9]
    • Else - Actions
to only this

  • For each (Integer IntegerVariable) from 1 to 2, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to ((IntegerVariable x 2) + 1)
          • PlayerKill[(Player number of (Owner of (Killing unit)))] Less than ((IntegerVariable x 2) + (3 + (IntegerVariable - 1)))
        • Then - Actions
          • Sound - Play Sound[(IntegerVariable + 5)]
          • Game - Display to (All players) the text: Text[(IntegerVariable + 5)]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to ((IntegerVariable x 2) + 6)
          • PlayerKill[(Player number of (Owner of (Killing unit)))] Less than ((IntegerVariable x 10) + ((IntegerVariable - 1) x 1000000000))
        • Then - Actions
          • Sound - Play Sound[(IntegerVariable + 7)]
          • Game - Display to (All players) the text: Text[(IntegerVariable + 7)]
        • Else - Actions
don't worry, i did test it before posting.
 
Last edited:
Level 3
Joined
Apr 6, 2012
Messages
22
you could do this using my method. and avoid of using Integer A, create a new integer variable and use that instead. one variable is enough for every loops you have (with the exception of multiple loops).

  • For each (Integer IntegerVariable) from 1 to 4, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerKill[(Player number of (Owner of (Killing unit)))] Equal to (IntegerVariable + 1)
        • Then - Actions
          • Sound - Play Sound[IntegerVariable]
          • Game - Display to (All players) the text: Text[IntegerVariable]
        • Else - Actions
it's less work, no ?

Yeah, but what if he gets more than 5 kills? Your trigger will not work past that point.
Of course, in a 5v5 match it is unlikely to get more than 5 kills in 60 seconds but it's not like it makes a huge difference.



unfortunately, this is the only way to do it.
the string will remain if you just change some part of it

Bah, alright then. No harm in asking.

and i want to ask something.

  • If - Conditions
    • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
    • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 5
so when the player kill is 3 and 4, they will play the same sound ?

Yes it will. This part of the trigger is for kill streak sounds (kills performed without dying in between, but not within a certain amount of time), and unlike the Multi Kill sounds I wanted them to have the same sound for several values of Kill Streaks.

anyway, this trigger could be looped either.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 5
    • Then - Actions
      • Game - Display to (All players) the text: Announcer_Text[6]
      • Sound - Play Announcer_Sounds[6]
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 5
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 8
    • Then - Actions
      • Game - Display to (All players) the text: Announcer_Text[7]
      • Sound - Play Announcer_Sounds[7]
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 8
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Less than 10
    • Then - Actions
      • Game - Display to (All players) the text: Announcer_Text[8]
      • Sound - Play Announcer_Sounds[8]
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • PlayerKillStreak[(Player number of (Owner of (Killing unit)))] Greater than or equal to 10
    • Then - Actions
      • Game - Display to (All players) the text: Announcer_Text[9]
      • Sound - Play Announcer_Sounds[9]
    • Else - Actions
to only this

  • For each (Integer IntegerVariable) from 1 to 2, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to ((IntegerVariable x 2) + 1)
          • PlayerKill[(Player number of (Owner of (Killing unit)))] Less than ((IntegerVariable x 2) + (3 + (IntegerVariable - 1)))
        • Then - Actions
          • Sound - Play Sound[(IntegerVariable + 5)]
          • Game - Display to (All players) the text: Text[(IntegerVariable + 5)]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PlayerKill[(Player number of (Owner of (Killing unit)))] Greater than or equal to ((IntegerVariable x 2) + 6)
          • PlayerKill[(Player number of (Owner of (Killing unit)))] Less than ((IntegerVariable x 10) + ((IntegerVariable - 1) x 1000000000))
        • Then - Actions
          • Sound - Play Sound[(IntegerVariable + 7)]
          • Game - Display to (All players) the text: Text[(IntegerVariable + 7)]
        • Else - Actions

Thanks, I might use that.
 
Top