• 🏆 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] Triggered spell does not work and i dont know why

Status
Not open for further replies.
Level 6
Joined
Sep 13, 2013
Messages
155
  • Channel Power
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel Power
    • Actions
      • Set FlameTongueIndex = (FlameTongueIndex + 1)
      • Set FlameTongueTargets[FlameTongueIndex] = (Units within (225.00 + (50.00 x (Real((Level of Channel Power for (Triggering unit)))))) of (Target point of ability being cast) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A Hero) Equal to False) and (((Matching un
      • Set FlameTongueDur[FlameTongueIndex] = 15.00
      • Unit - Add Disarm to (Triggering unit)
      • Unit - Remove (Ability being cast) from (Triggering unit)
      • Unit Group - Pick every unit in FlameTongueTargets[FlameTongueIndex] and do (Actions)
        • Loop - Actions
          • Unit - Add Flametongue Damage (+10) to (Picked unit)
          • Unit - Set level of Flametongue Damage (+10) for (Picked unit) to (Level of Channel Power for (Triggering unit))
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call DestroyGroup(udg_FlameTongueTargets[udg_FlameTongueIndex])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FlameTongueIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on Channel Power Loop <gen>
        • Else - Actions
  • Channel Power Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer FlameTongueCurrentIndex) from 1 to FlameTongueIndex, do (Actions)
        • Loop - Actions
          • Set FlameTongueDur[FlameTongueCurrentIndex] = (FlameTongueDur[FlameTongueCurrentIndex] - 0.10)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FlameTongueDur[FlameTongueCurrentIndex] Less than or equal to 0.00
            • Then - Actions
              • Unit Group - Pick every unit in FlameTongueTargets[FlameTongueCurrentIndex] and do (Actions)
                • Loop - Actions
                  • Unit - Remove Flametongue Damage (+10) from (Picked unit)
              • Custom script: call DestroyGroup(udg_FlameTongueTargets[udg_FlameTongueCurrentIndex])
              • Set FlameTongueTargets[FlameTongueCurrentIndex] = FlameTongueTargets[FlameTongueIndex]
              • Set FlameTongueDur[FlameTongueCurrentIndex] = FlameTongueDur[FlameTongueIndex]
              • Set FlameTongueIndex = (FlameTongueIndex - 1)
              • Set FlameTongueCurrentIndex = (FlameTongueCurrentIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FlameTongueIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
it's a simple spell that gives bonus damage to units in the target area for a short duration while disarming and removing the ability forever. I test it, it gives level 1 value damage at all levels and the damage won't get removed after the duration ends. the special effect doesn't show up either.
 
Why are you setting the level of the bonus ability to 0?

In the For Group Actions, when the level of the buff ability is set to the level of the spell being cast, the resulting parameter is 0, since the ability was removed beforehand.

As for the special effect, I suppose the model does not have some sort of stand animation, so it does not get displayed.
 
Level 6
Joined
Sep 13, 2013
Messages
155
Why are you setting the level of the bonus ability to 0?

In the For Group Actions, when the level of the buff ability is set to the level of the spell being cast, the resulting parameter is 0, since the ability was removed beforehand.

As for the special effect, I suppose the model does not have some sort of stand animation, so it does not get displayed.
okay i moved the remove ability action to after the for unit group action and the level values now work correctly. but still the damage bonus won't go away after the duration ends.
 
Status
Not open for further replies.
Top