Buff Problem

Status
Not open for further replies.
Level 13
Joined
Oct 25, 2009
Messages
995
I follow defskull to make the Strygwyr's Thirst,but the buff doesn't remove when the hero was dead,how do i fix it?
P/S:i set the Unit within Range to 16000 of Position of the LearnerLoc.And i change the name of the ability,here is the trigger:
  • Events
    • Unit - A unit Learns a skill
  • Conditions
    • (Learned Hero Skill) Equal to Wythim's Thrist
  • Actions
    • Set Learner = (Triggering unit)
    • Trigger - Turn on WT Check <gen>
Trigger 2
  • WT Check
  • Events
    • Time - Every 3.00 seconds of game time
  • Conditions
  • Actions
    • Set LearnerLoc = (Position of Learner)
    • Set AOE = (Units within 4000.00 of LearnerLoc matching ((((Matching unit) is dead) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of Learner)) Equal to True) and (((Matching unit) is A Hero) Equal to True))))
    • Unit Group - Pick every unit in AOE and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Percentage mana of (Picked unit)) Less than or equal to 15.00
          • Then - Actions
            • Unit - Create 1 Dummy(Can be use in another spell) for (Owner of Learner) at LearnerLoc facing Default building facing degrees
            • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
            • Unit - Add Thrist to (Last created unit)
            • Unit - Set level of Thrist for Learner to (Level of Wythim's Thrist for Learner)
            • Unit - Order (Last created unit) to Orc Shaman - Bloodlust Learner
            • Unit - Grant shared vision of (Picked unit) to (Owner of Learner)
          • Else - Actions
            • Unit - Remove Wythim's Thirst buff from Learner
            • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Level of Wythim's Thrist for Learner) Greater than 1
              • Then - Actions
                • Trigger - Turn on WT Check 2 <gen>
                • Trigger - Turn off (This trigger)
              • Else - Actions
    • Custom script: call DestroyGroup(udg_AOE)
    • Custom script: call RemoveLocation(udg_LearnerLoc)
Trigger 3
  • WT Check 2
  • Events
    • Time - Every 3.00 seconds of game time
  • Conditions
  • Actions
    • Set LearnerLoc = (Position of Learner)
    • Set AOE = (Units within 8000.00 of LearnerLoc matching ((((Matching unit) is dead) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Learner)) Equal to True) and (((Matching unit) is A Hero) Equal to True))))
    • Unit Group - Pick every unit in AOE and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Percentage mana of (Picked unit)) Less than or equal to 30.00
          • Then - Actions
            • Unit - Create 1 Dummy(Can be use in another spell) for (Owner of Learner) at LearnerLoc facing Default building facing degrees
            • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
            • Unit - Add Thrist to (Last created unit)
            • Unit - Set level of Thrist for Learner to (Level of Wythim's Thrist for Learner)
            • Unit - Order (Last created unit) to Orc Shaman - Bloodlust Learner
            • Unit - Grant shared vision of (Picked unit) to (Owner of Learner)
          • Else - Actions
            • Unit - Remove Wythim's Thirst buff from Learner
            • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Level of Wythim's Thrist for Learner) Greater than 2
              • Then - Actions
                • Trigger - Turn on WT Check 3 <gen>
                • Trigger - Turn off (This trigger)
              • Else - Actions
    • Custom script: call DestroyGroup(udg_AOE)
    • Custom script: call RemoveLocation(udg_LearnerLoc)
Trigger 4
  • WT Check 3
  • Events
    • Time - Every 3.00 seconds of game time
  • Conditions
  • Actions
    • Set LearnerLoc = (Position of Learner)
    • Set AOE = (Units within 12000.00 of LearnerLoc matching ((((Matching unit) is dead) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of Learner)) Equal to True) and (((Matching unit) is A Hero) Equal to True))))
    • Unit Group - Pick every unit in AOE and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Percentage mana of (Picked unit)) Less than or equal to 45.00
          • Then - Actions
            • Unit - Create 1 Dummy(Can be use in another spell) for (Owner of Learner) at LearnerLoc facing Default building facing degrees
            • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
            • Unit - Add Thrist to (Last created unit)
            • Unit - Set level of Thrist for Learner to (Level of Wythim's Thrist for Learner)
            • Unit - Order (Last created unit) to Orc Shaman - Bloodlust Learner
            • Unit - Grant shared vision of (Picked unit) to (Owner of Learner)
          • Else - Actions
            • Unit - Remove Wythim's Thirst buff from Learner
            • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Level of Wythim's Thrist for Learner) Greater than 3
              • Then - Actions
                • Trigger - Turn on WT Check 4 <gen>
                • Trigger - Turn off (This trigger)
              • Else - Actions
    • Custom script: call DestroyGroup(udg_AOE)
    • Custom script: call RemoveLocation(udg_LearnerLoc)
Trigger 5
  • WT Check 5
  • Events
    • Time - Every 3.00 seconds of game time
  • Conditions
  • Actions
    • Set LearnerLoc = (Position of Learner)
    • Set AOE = (Units within 16000.00 of LearnerLoc matching ((((Matching unit) is dead) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of Learner)) Equal to True) and (((Matching unit) is A Hero) Equal to True))))
    • Unit Group - Pick every unit in AOE and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Percentage mana of (Picked unit)) Less than or equal to 60.00
          • Then - Actions
            • Unit - Create 1 Dummy(Can be use in another spell) for (Owner of Learner) at LearnerLoc facing Default building facing degrees
            • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
            • Unit - Add Thrist to (Last created unit)
            • Unit - Set level of Thrist for Learner to (Level of Wythim's Thrist for Learner)
            • Unit - Order (Last created unit) to Orc Shaman - Bloodlust Learner
            • Unit - Grant shared vision of (Picked unit) to (Owner of Learner)
          • Else - Actions
            • Unit - Remove Wythim's Thirst buff from Learner
            • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
    • Custom script: call DestroyGroup(udg_AOE)
    • Custom script: call RemoveLocation(udg_LearnerLoc)
Buff doesn't remove when the hero is dead :goblin_jawdrop:
P/S:The buff level always is 1,i have set the Thrist to 4 level,all buff is same
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Are you testing the same map or what ?
I mean, did you not type the -Reset back ?
The enemy's Mana is still below 40%, that will trigger the Strygwyr's Thirst, it's natural
Well, it's different story if you test it on other map

EDIT:
This is an updated version + new conditions to check if the Hero is dead, no longer gives vision
  • ST Check Level 1
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Set LearnerLoc = (Position of Learner)
      • Set AOE = (Units within 3000.00 of LearnerLoc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Learner)) Equal to True) and (((Matching unit) is A Hero) Equal to True))))
      • Unit Group - Pick every unit in AOE and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Percentage mana of (Picked unit)) Less than or equal to 40.00) and ((Level of Strygwyr's Thrist for Learner) Equal to 1)
            • Then - Actions
              • Unit - Create 1 Dummy for (Owner of Learner) at LearnerLoc facing Default building facing degrees
              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
              • Unit - Add Strygwyr's Thirst Buff to (Last created unit)
              • Unit - Set level of Strygwyr's Thirst Buff for (Last created unit) to (Level of Strygwyr's Thrist for Learner)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust Learner
              • Unit - Grant shared vision of (Picked unit) to (Owner of Learner)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Learner is dead) Equal to True
                • Then - Actions
                  • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
                • Else - Actions
            • Else - Actions
              • Unit - Remove Strygwyr's Thirst buff from Learner
              • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Strygwyr's Thrist for Learner) Greater than 1
        • Then - Actions
          • Trigger - Turn on ST Check Level 2 <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_AOE)
      • Custom script: call RemoveLocation(udg_LearnerLoc)
EDIT 2:
I've tested it for 5 times, it's okay if the enemy Hero unit has more than 40% Mana, that will remove the buff by trigger
You can still got the buff IF the enemy is still below 40% in 16000 AOE
 
Level 13
Joined
Oct 25, 2009
Messages
995
Are you testing the same map or what ?
I mean, did you not type the -Reset back ?
The enemy's Mana is still below 40%, that will trigger the Strygwyr's Thirst, it's natural
Well, it's different story if you test it on other map

EDIT:
This is an updated version + new conditions to check if the Hero is dead, no longer gives vision
  • ST Check Level 1
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Set LearnerLoc = (Position of Learner)
      • Set AOE = (Units within 3000.00 of LearnerLoc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Learner)) Equal to True) and (((Matching unit) is A Hero) Equal to True))))
      • Unit Group - Pick every unit in AOE and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Percentage mana of (Picked unit)) Less than or equal to 40.00) and ((Level of Strygwyr's Thrist for Learner) Equal to 1)
            • Then - Actions
              • Unit - Create 1 Dummy for (Owner of Learner) at LearnerLoc facing Default building facing degrees
              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
              • Unit - Add Strygwyr's Thirst Buff to (Last created unit)
              • Unit - Set level of Strygwyr's Thirst Buff for (Last created unit) to (Level of Strygwyr's Thrist for Learner)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust Learner
              • Unit - Grant shared vision of (Picked unit) to (Owner of Learner)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Learner is dead) Equal to True
                • Then - Actions
                  • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
                • Else - Actions
            • Else - Actions
              • Unit - Remove Strygwyr's Thirst buff from Learner
              • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Strygwyr's Thrist for Learner) Greater than 1
        • Then - Actions
          • Trigger - Turn on ST Check Level 2 <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_AOE)
      • Custom script: call RemoveLocation(udg_LearnerLoc)
EDIT 2:
I've tested it for 5 times, it's okay if the enemy Hero unit has more than 40% Mana, that will remove the buff by trigger
You can still got the buff IF the enemy is still below 40% in 16000 AOE

My problem is,when enemy hero is dead,still got the buff.(only got 1 hero)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Try this:
  • ST Check Level 1
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Set LearnerLoc = (Position of Learner)
      • Set AOE = (Units within 3000.00 of LearnerLoc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Learner)) Equal to True) and (((Matching unit) is A Hero) Equal to True))))
      • Unit Group - Pick every unit in AOE and do (Actions)
        • Loop - Actions
          • Set PickedUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Percentage mana of (Picked unit)) Less than or equal to 40.00) and ((Level of Strygwyr's Thrist for Learner) Equal to 1)
            • Then - Actions
              • Unit - Create 1 Dummy for (Owner of Learner) at LearnerLoc facing Default building facing degrees
              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
              • Unit - Add Strygwyr's Thirst Buff to (Last created unit)
              • Unit - Set level of Strygwyr's Thirst Buff for (Last created unit) to (Level of Strygwyr's Thrist for Learner)
              • Unit - Order (Last created unit) to Orc Shaman - Bloodlust Learner
              • Unit - Grant shared vision of (Picked unit) to (Owner of Learner)
            • Else - Actions
              • Unit - Remove Strygwyr's Thirst buff from Learner
              • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Learner is dead) Equal to True) or (((Picked unit) is dead) Equal to True)
        • Then - Actions
          • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
          • Unit - Remove Strygwyr's Thirst buff from Learner
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Strygwyr's Thrist for Learner) Greater than 1
        • Then - Actions
          • Trigger - Turn on ST Check Level 2 <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_AOE)
      • Custom script: call RemoveLocation(udg_LearnerLoc)
But the buff is updated and it seems kinda, lol
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
It works all the time, here's an uploaded version
Type -Kill to kill the enemy
Then, while the unit dies, level up your spell then wait for the revival
You can see that the buff has been changed to Level 1 to Level 2 (Example)
 

Attachments

  • Strygwyr's Thirst (1).w3x
    21.1 KB · Views: 43
Level 13
Joined
Oct 25, 2009
Messages
995
ST Check Level 3 doesn't need this?
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Learner is dead) Equal to True <<<<< here doesn't need or picked unit is dead equal to true?
    • Then - Actions
      • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
    • Else - Actions
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
ST Check Level 3 doesn't need this?
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Learner is dead) Equal to True <<<<< here doesn't need or picked unit is dead equal to true?
    • Then - Actions
      • Unit - Deny shared vision of (Picked unit) to (Owner of Learner)
    • Else - Actions

Ooooops~
Sorry I forgot to add the Conditions to the trigger !
Just add those conditions, I may have overlooked at it
 
Status
Not open for further replies.
Top