• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Counting Bug

Status
Not open for further replies.
  • Finish Wolves Q
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Spirit Wolf
    • Actions
      • Set I_Wolves = (I_Wolves + 1)
      • Multiboard - Set the text for Multiboards[1] item in column 2, row 2 to (Kill Spirit Wolves [ + ((String(I_Wolves)) + /4]))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • I_Wolves Greater than or equal to 4
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Quest - Mark Quest[32] as Completed
          • Quest - Display to (All players) the Quest Update message: |c003366ffSpirit Wo...
          • Multiboard - Set the text for Multiboards[1] item in column 2, row 1 to Dragonlings
          • Multiboard - Set the text for Multiboards[1] item in column 1, row 1 to Quest:
          • Multiboard - Set the text for Multiboards[1] item in column 2, row 2 to Finished
          • Multiboard - Set the text for Multiboards[1] item in column 2, row 3 to Gaglur's Tomb
          • Floating Text - Create floating text that reads +50 EXP above Unit with Z offset 0.00, using font size 13.00, color (0.00%, 80.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 128.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 0.40 seconds
          • Hero - Add 50 experience to Unit, Hide level-up graphics
        • Else - Actions
The problem is that it's not counting the kills.
Known bug or am I doing something terribly wrong?
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =O

It doesn't count? Have to say, that I can't see any mistake at all. Replace (Dying unit) with (Triggering unit) and are you sure, you choose and/or kill the correct wolves? =O

Else I can't see a fault and normally it should count it, wouldn't be the first time, that someone do this simple thing ....
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
looks OK to me...

  • Kills
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set Kills = (Kills + 1)
      • Multiboard - Set the text for MB item in column 2, row 1 to (Kill Spirit Wolves + ((String(Kills)) + /4))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Kills Equal to 4
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
To make your trigger performs better:

  • (Unit-type of (Dying unit)) Equal to Spirit Wolf
Instead of Dying unit, use Triggering unit

  • Set I_Wolves = (I_Wolves + 1)
Put this in "Else - Actions"
Same goes to that multiboard action

EDIT:
I am thinking that you kill a different unit, maybe you confused that unit with another custom unit ?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
No, EVEN if you didn't put that action in "Else - Actions" function, it still keep track of the count per kill...
Weird..
It must be the problem with that Event
I'm thinking... it has to do with incorrect unit types
Perhaps, you created a custom ones, but used as reference as default ones
 
  • Awoken Warriors Count
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Awoken Warrior
    • Actions
      • Set I_AwokenWarriors = (I_AwokenWarriors + 1)
      • Multiboard - Set the text for Multiboards[1] item in column 2, row 2 to (Kill the Awoken Warriors + ( [ + ((String(I_AwokenWarriors)) + (/ + 25]))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • I_AwokenWarriors Equal to 25
        • Then - Actions
          • Multiboard - Set the text for Multiboards[1] item in column 2, row 2 to Completed
          • Quest - Display to (All players) the Quest Update message: Final Defense: Comp...
          • Quest - Mark Quest[15] as Completed
          • Quest - Display to (All players) the Quest Update message: The Eye: -Find T...
          • Quest - Create a Required quest titled The Eye with the description -Find The Eye in th..., using icon path ReplaceableTextures\CommandButtons\BTNPEyeSight.blp
          • Set Quest[16] = (Last created quest)
          • Multiboard - Set the text for Multiboards[1] item in column 2, row 1 to The Eye
          • Multiboard - Set the text for Multiboards[1] item in column 1, row 1 to Quest:
          • Multiboard - Set the text for Multiboards[1] item in column 2, row 2 to Find The Eye in the...
          • Multiboard - Set the text for Multiboards[1] item in column 2, row 3 to Main Chamber
          • Unit - Unpause Statue 0255 <gen>
          • Unit - Unpause Statue 0256 <gen>
        • Else - Actions
  • Finish Wolves Q
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Spirit Wolf
    • Actions
      • Set I_Wolves = (I_Wolves + 1)
      • Multiboard - Set the text for Multiboards[1] item in column 2, row 2 to (Kill Spirit Wolves [ + ((String(I_Wolves)) + /4]))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • I_Wolves Greater than or equal to 4
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Quest - Mark Quest[32] as Completed
          • Quest - Display to (All players) the Quest Update message: |c003366ffSpirit Wo...
          • Multiboard - Set the text for Multiboards[1] item in column 2, row 1 to Dragonlings
          • Multiboard - Set the text for Multiboards[1] item in column 1, row 1 to Quest:
          • Multiboard - Set the text for Multiboards[1] item in column 2, row 2 to Finished
          • Multiboard - Set the text for Multiboards[1] item in column 2, row 3 to Gaglur's Tomb
          • Floating Text - Create floating text that reads +50 EXP above Unit with Z offset 0.00, using font size 13.00, color (0.00%, 80.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 128.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 0.40 seconds
          • Hero - Add 50 experience to Unit, Hide level-up graphics
        • Else - Actions

The one on the left works and as far as I know, the 2 triggers are almost the same.
And I debugged the trigger, nothing happens apparently.
 
If nothing happened, then that means that the spirit wolves are not dieing. Or that means that you selected the wrong unit for the field.

Just add a display timed text for String(I_Wolves) and see what it displays. If it never displays, it either means that I_Wolves doesn't have an initial value (check the variable editor), or it means that the trigger isn't running. That means that the condition isn't being met.
 
Level 16
Joined
May 1, 2008
Messages
1,605
br5h35k52juicm2k1.png


Joke, but good that this mysterious problem seems to be solved =)
 
Status
Not open for further replies.
Top