• 🏆 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!

Help with trigger

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
hey I've been helped quite extensively by the user Flux and he has developed a trigger which should work perfectly for my desired ability how ever it just doesn't and neither of us can figure out why. btw I have a DDS installed in case that conflicts with any thing


Desired ability's function: When ever a unit dies around the Avenger when she has the Avenger of the Forests ability (based on devotion aura) she will be buffed with a custom bloodlust and inner fire casted on her by a dummy

here is the trigger which doesn't work oddly for me

  • Avenger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Dummy Spellcaster
    • Actions
      • Game - Display to (All players) the text: A Unit Dies
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempOwner = (Triggering player)
      • Set CreateDummy = True
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of TempLoc) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit belongs to an ally of TempOwner) Equal to True
              • (Level of Avenger of the Forests ( Avenger ) for TempUnit) Greater than 0
            • Then - Actions
              • Game - Display to (All players) the text: ((Name of TempUnit) + have the ability)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CreateDummy Equal to True
                • Then - Actions
                  • Set CreateDummy = False
                  • Game - Display to (All players) the text: Dummy Unit Created
                  • Unit - Create 1 Dummy Spellcaster for TempOwner at TempLoc facing Default building facing degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add a 0.20 second Generic expiration timer to Dummy
                  • Unit - Add Bloodlust ( attack speed increase for AvengeroftheForests ) to Dummy
                  • Unit - Add Inner Fire ( damage increase for AvengeroftheForests ) to Dummy
                • Else - Actions
              • Set TempLoc2 = (Position of TempUnit)
              • Unit - Move Dummy instantly to TempLoc2
              • Custom script: call RemoveLocation(udg_TempLoc2)
              • Unit - Order Dummy to Human Priest - Inner Fire TempUnit
              • Unit - Order Dummy to Orc Shaman - Bloodlust TempUnit
              • Game - Display to (All players) the text: (Ordered the Dummy to Cast Bloodlust and InnerFire on + (Name of TempUnit))
            • Else - Actions
              • Game - Display to (All players) the text: ((Name of TempUnit) + doesn't have the ability)
      • Custom script: call RemoveLocation(udg_TempLoc)
 
Level 9
Joined
Jun 10, 2013
Messages
473
What is not working excatly?
Is dummy casting inner fire or bloodlust only? Maybe you need 2 dummys to cast 2 ability at the same time

nothing happens except these text error being displayed

A unit dies
Avenger have the ability
dummy unit created
ordered the dummy to cast bloodlust and inner fire on dummy spell caster
treant warrior doesn't have the ability
dummy unit doesn't have the ability


Note treant warrior is the allied unit that died while near her
 
Level 9
Joined
Jun 10, 2013
Messages
473
test:
set longer expiration timer to lets say, 15sec
create normal unit instead dummy
try to use abilities (bloodlust/innerfire) manually

replaced the dummy with a wisp and the wisp ends up getting the abilities casted on it instead of the hero and every time the wisp expiration time is up, it dies and is created again at the spot of its death and casts the bloodlust and innerfire on its self and the cycle repeats its self and using the custom abilities manually work fine
 
Status
Not open for further replies.
Top