• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Leaderboard Update Bug

Status
Not open for further replies.
Hello, im haveing a wierd bug where Red(player1) gets extra kills on his leaderboard, every time a unit owned by him dies Via negative hp regeneration/dummy he gets an extra kill on his score, this ofcourse dosnt update the leaderboard but it does update the variable, so that next time i actually kill a unit i get 10 or so kills, depending on how many dummys die.
I have no other kills dealing with this variable yet it continues to add to the variable. Here is the trig
  • Update Leaderboard
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Not equal to Attack spell
      • (Unit-type of (Dying unit)) Not equal to Building Rally
      • (Unit-type of (Dying unit)) Not equal to Mass attack dot
      • (Unit-type of (Dying unit)) Not equal to Move spell
      • (Unit-type of (Dying unit)) Not equal to Relay spell
      • (Owner of (Dying unit)) Not equal to (Owner of (Killing unit))
    • Actions
      • Set KillScore[(Player number of (Owner of (Killing unit)))] = (KillScore[(Player number of (Owner of (Killing unit)))] + 1)
      • Leaderboard - Change the value for (Owner of (Killing unit)) in kills to KillScore[(Player number of (Owner of (Killing unit)))]
      • Leaderboard - Sort kills by Value in Descending order
all the unit type of dieings are dummys added in atempt to stop it from glitching but they failed.
 
Level 4
Joined
Feb 4, 2008
Messages
82
I think you should use the "And" condition, that will make it work, i tried multiple conditioning like that before but it didn't work.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
I think you should use the "And" condition, that will make it work, i tried multiple conditioning like that before but it didn't work.
It works fine, And is implicit in GUI.

As for the bug, it is caused because Red happens to have the same player ID as a null player. You can filter this out by making sure that Killing Unit is not equal to No Unit.
 
Status
Not open for further replies.
Top