• 🏆 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] Spell Help, Cast Ability Wont work

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
:thumbs_down: Hi, i cant get the
  • Unit - Order Dummy to Human Sorceress - Slow (Attacking unit)
I got a ability based on Slow, and even non edited. The dummy has enough mana. I can get it to work with my other abilities (Storm Bolt and Heal) Here is all the codes for this spell. I need an entangling roots :)

  • Spell Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Trigger - Add to Entangling Roots <gen> the event (Unit - (Picked unit) Takes damage)
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Set EntanglingRootsDamage[1] = 30
      • Set EntanglingRootsDamage[2] = 40
      • Set EntanglingRootsDamage[3] = 50
      • Set EntanglingRootsPercent[1] = 5
      • Set EntanglingRootsPercent[2] = 10
      • Set EntanglingRootsPercent[3] = 15
      • Set EntanglingRootsLevels[1] = 1
      • Set EntanglingRootsLevels[2] = 2
      • Set EntanglingRootsLevels[3] = 3
  • Spell Ini2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Entangling Roots <gen> the event (Unit - (Entering unit) Takes damage)
  • Entangling Roots
    • Events
    • Conditions
    • Actions
      • -------- - --------
      • -------- Variables --------
      • Set EntanglingRootsPercent2 = (Random integer number between 1 and 100)
      • -------- - --------
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Attacking unit) belongs to an enemy of (Owner of (Attacked unit))) Equal to True
              • ((Attacking unit) is Magic Immune) Not equal to True
              • ((Attacking unit) has buff Invulnerable) Not equal to True
              • (Level of Entangling Roots (Aura) for (Attacked unit)) Equal to EntanglingRootsLevels[(Integer A)]
              • EntanglingRootsPercent2 Less than or equal to EntanglingRootsPercent[(Integer A)]
            • Then - Actions
              • Game - Display to (All players) the text: test
              • -------- - --------
              • -------- Setting a Point Variable --------
              • Set TempLoc = (Position of (Attacking unit))
              • -------- - --------
              • -------- Entangling --------
              • Unit - Create 1 Dummy for (Owner of (Attacked unit)) at TempLoc facing Default building facing degrees
              • Set Dummy = (Last created unit)
              • Unit - Order Dummy to Human Sorceress - Slow (Attacking unit)
              • Unit - Add a 3.00 second Generic expiration timer to Dummy
              • -------- - --------
              • -------- Leaks --------
              • Custom script: call RemoveLocation(udg_TempLoc)
              • -------- - --------
            • Else - Actions
Its not with the conditions, i get the Test Message
 
Status
Not open for further replies.
Top