• 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.

What The...

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Okay, I have a trigger that will add 4 INT per kill to the killing unit that has Ability X.
Everything works fine, except that at random times, the add value is not 4, it is 7.
Now I wanna know WHERE DOES THIS 7 COMES FROM ?

Here's a test map.

Instructions to test:
1. Learn the Ability (Soul Steal - Devotion Aura)
2. Kill units
3. Each time it kills the unit, the difference after add and before add is shown (if it is 4, it is good... but if it is 7, WHY?!)
4. Kill up to 10 units (the bug should occur at value 8th ~ 10th I think)
5. Max soul is 10.
 

Attachments

  • Soul Steal.w3x
    14.3 KB · Views: 51
Level 20
Joined
Jul 14, 2011
Messages
3,213
  • Unit Group - Add (Triggering unit) to SS_Group
  • -->
  • Unit Group - Add TempUnit to SS_Group
  • t
  • SS_SoulCollect Not equal to SS_SoulLimit
  • -->
  • SS_SoulCollect less than or Equal to SS_SoulLimit
  • Set TempInteger2 = (Intelligence of TempUnit (Exclude bonuses))
  • Set TempInteger3 = (TempInteger2 - TempInteger) //--> So far, TempInteger has no value. Hasn't been set.
  • Set TempInteger = TempInteger2 //--> I see no use for this.
And, MOST IMPORTANT: The 7 comes from the unit leveling up, which adds by default in the Object Editor +3 Int per level :) +4 of the ability = 7. It goes from 20 to 24, but levels up, and goes to 27.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Unit Group - Add (Triggering unit) to SS_Group
  • -->
  • Unit Group - Add TempUnit to SS_Group
Okay... although this has nothing to do with the bugged value.
  • t
  • SS_SoulCollect Not equal to SS_SoulLimit
  • -->
  • SS_SoulCollect less than or Equal to SS_SoulLimit
I said everything works fine, the SoulLimit really limits it up to 10 kills.
  • Set TempInteger2 = (Intelligence of TempUnit (Exclude bonuses))
  • Set TempInteger3 = (TempInteger2 - TempInteger) //--> So far, TempInteger has no value. Hasn't been set.
  • Set TempInteger = TempInteger2 //--> I see no use for this.
  • Actions
    • Set TempUnit = (Triggering unit)
    • Set SS_SoulCollect = 0
    • Unit Group - Add TempUnit to SS_Group
    • Custom script: set udg_SS_Key = GetHandleId(udg_TempUnit)
    • Hashtable - Save SS_SoulCollect as 0 of SS_Key in SS_Hashtable
    • Set TempInteger = (Intelligence of TempUnit (Exclude bonuses))
Can't you see the action at the most below of that trigger.
That is to set the initial INT of that unit.

And this TempInteger(2)(3) does not have to do with the triggers at all.
It is part of the message showing, don't focus on that.

Just focus on how did the value rise to 7 from 4. Where did that 7 comes from ?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Let me quote myself:
And, MOST IMPORTANT: The 7 comes from the unit leveling up, which adds by default in the Object Editor +3 Int per level :) +4 of the ability = 7. It goes from 20 to 24, but levels up, and goes to 27.
 
Status
Not open for further replies.
Top