• 🏆 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] Impious Vengeance

Status
Not open for further replies.
Level 2
Joined
May 31, 2008
Messages
8
I'm sure I've just gone blind from making so many of these lately but I'm stuck again. I can't figure out why this spell isn't working properly, it's supposed to damage the target unit and then up to four other enemy units within range. It usually performs properly on the first go, but then starts effecting random amounts of targets between 1-5.

EDIT: Silly me I got it to work.

  • Impious Vengeance
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Impious Vengeance (Frost Bolt)
    • Actions
      • Set Temp_Player = (Owner of (Casting unit))
      • Set Temp_Point = (Position of (Casting unit))
      • Set Temp_Unit2 = (Target unit of ability being cast)
      • For each (Integer A) from 1 to 1, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Caster Dummy for Temp_Player at Temp_Point facing Temp_Real degrees
          • Set Temp_Unit = (Last created unit)
          • Unit - Add Impious Vengeance (Dummy) to Temp_Unit
          • Unit - Add a 4.00 second Generic expiration timer to Temp_Unit
          • Unit - Order Temp_Unit to Neutral - Hurl Boulder Temp_Unit2
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 800.00 of Temp_Point matching (((Owner of (Matching unit)) is an enemy of Temp_Player) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set Temp_Unit2 = (Picked unit)
          • Unit Group - Add Temp_Unit2 to Temp_Group
          • Game - Display to (All players) the text: 1
          • Custom script: set udg_Temp_Unit2 = null
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set Temp_Unit2 = (Random unit from Temp_Group)
          • Unit Group - Remove Temp_Unit2 from Temp_Group
          • Unit - Create 1 Caster Dummy for Temp_Player at Temp_Point facing Temp_Real degrees
          • Set Temp_Unit = (Last created unit)
          • Unit - Add Impious Vengeance (Dummy) to Temp_Unit
          • Unit - Add a 4.00 second Generic expiration timer to Temp_Unit
          • Unit - Order Temp_Unit to Neutral - Hurl Boulder Temp_Unit2
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Unit2 = (Picked unit)
          • Unit Group - Remove Temp_Unit2 from Temp_Group
          • Custom script: set udg_Temp_Unit2 = null
      • Custom script: call DestroyGroup (udg_Temp_Group)
      • Custom script: call RemoveLocation (udg_Temp_Point)
      • Custom script: set udg_Temp_Unit = null
      • Custom script: set udg_Temp_Unit2 = null
      • Custom script: set udg_Temp_Player = null
      • Custom script: set udg_Temp_Group = CreateGroup()
 

Attachments

  • woops.gif
    woops.gif
    91 KB · Views: 108
Level 2
Joined
May 31, 2008
Messages
8
Doubt it, that loop isn't there anymore, I'm just really lazy as I make these. So I copy and paste a lot, and just didn't bother to move those actions outside of the loop and remove the loop itself until I had the ability working properly.
 
Level 2
Joined
May 31, 2008
Messages
8
I'm not a perfectionist =(
But I think I'll go download ver 3.1
 

Attachments

  • pfffft.gif
    pfffft.gif
    28.5 KB · Views: 86
Status
Not open for further replies.
Top