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

[Trigger] Problem With Spell :P

Status
Not open for further replies.
Level 14
Joined
Nov 2, 2008
Messages
579
Hey can someone please tell me whats wrong with this trigger :/
I tried everything.
The problem is when the spell is casted, the arrow does not move, it just stands there.

  • Arcane Arrow
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Arrow
    • Actions
      • -------- =============== --------
      • -------- Sets casting unit --------
      • -------- =============== --------
      • Set AA_Casting[AA_Index[2]] = (Casting unit)
      • -------- =============== --------
      • -------- Sets point of ability being casted --------
      • -------- =============== --------
      • Set AA_Point1[AA_Index[2]] = (Target point of ability being cast)
      • -------- =============== --------
      • -------- Sets position of casting unit --------
      • -------- =============== --------
      • Set AA_Pos[AA_Index[2]] = (Position of AA_Casting[AA_Index[2]])
      • -------- =============== --------
      • -------- Sets angle between the caster and the point of ability casted. --------
      • -------- =============== --------
      • Set AA_Real[AA_Index[2]] = (Angle from AA_Pos[AA_Index[2]] to AA_Point1[AA_Index[2]])
      • -------- =============== --------
      • -------- The offset of the arrow --------
      • -------- =============== --------
      • Set AA_Point2[AA_Index[2]] = (AA_Point1[AA_Index[2]] offset by 80.00 towards AA_Real[AA_Index[2]] degrees)
      • -------- =============== --------
      • -------- Creates the unit and sets everything up needed. --------
      • -------- =============== --------
      • Unit - Create 1 Dummy - Arrow for (Owner of (Triggering unit)) at AA_Pos[AA_Index[2]] facing AA_Real[AA_Index[2]] degrees
      • -------- This will determine the damage done later on --------
      • Unit - Set the custom value of (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
      • Unit - Add a 1.60 second Generic expiration timer to (Last created unit)
      • Unit - Turn collision for (Last created unit) Off
      • -------- =============== --------
      • -------- Turns on Loop Trigger --------
      • -------- =============== --------
      • Trigger - Turn on Arcane Arrow Loop <gen>
      • -------- =============== --------
      • -------- Removes leaks --------
      • -------- =============== --------
      • Custom script: call RemoveLocation( udg_AA_Point1[ udg_AA_Index[2]] )
      • Custom script: call RemoveLocation( udg_AA_Point2[ udg_AA_Index[2]] )
      • Custom script: call RemoveLocation( udg_AA_Pos[ udg_AA_Index[2]] )
  • Arcane Arrow Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer AA_Index[3]) from 1 to AA_Index[2], do (Actions)
        • Loop - Actions
          • -------- =============== --------
          • -------- Sets up Unit Group --------
          • -------- =============== --------
          • Set AA_Group1[AA_Index[3]] = (Units of type Dummy - Arrow)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in AA_Group1[AA_Index[3]]) Greater than 0
            • Then - Actions
              • Unit Group - Pick every unit in AA_Group1[AA_Index[3]] and do (Actions)
                • Loop - Actions
                  • -------- =============== --------
                  • -------- Sets up offsets and angles etc etc --------
                  • -------- =============== --------
                  • Set AA_Pos[AA_Index[3]] = (Position of (Picked unit))
                  • Set AA_Point1[AA_Index[3]] = (AA_Pos[AA_Index[3]] offset by 30.00 towards (Facing of (Picked unit)) degrees)
                  • -------- =============== --------
                  • -------- Moves the unit --------
                  • -------- =============== --------
                  • Unit - Move (Picked unit) instantly to AA_Point1[AA_Index[3]]
                  • Set AA_TempUnit[AA_Index[3]] = (Picked unit)
                  • Set AA_Group2[AA_Index[3]] = (Units within 50.00 of AA_Point1[AA_Index[3]])
                  • Unit Group - Pick every unit in AA_Group2[AA_Index[3]] and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) is A structure) Equal to False
                          • ((Picked unit) is alive) Equal to True
                          • ((Picked unit) belongs to an enemy of (Owner of Temp_Unit)) Equal to True
                          • ((Picked unit) is Magic Immune) Not equal to True
                        • Then - Actions
                          • -------- =============== --------
                          • -------- Kills the arrow when it gets too close to someone. --------
                          • -------- =============== --------
                          • Unit - Kill AA_TempUnit[AA_Index[3]]
                          • Unit - Cause Temp_Unit to damage (Picked unit), dealing (200.00 x (Real((Custom value of AA_TempUnit[AA_Index[3]])))) damage of attack type Spells and damage type Normal
                          • -------- =============== --------
                          • -------- Some effects :P :P :P --------
                          • -------- =============== --------
                          • Special Effect - Create a special effect at Temp_Pos[2] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                  • -------- =============== --------
                  • -------- Removes Group Leak :) --------
                  • -------- =============== --------
                  • Custom script: call DestroyGroup( udg_AA_Group2[ udg_AA_Index[3]] )
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (AA_TempUnit[AA_Index[3]] is alive) Equal to False
                    • Then - Actions
                      • -------- =============== --------
                      • -------- Removes arrow from game, should it have exploded :P :P :P --------
                      • -------- =============== --------
                      • Unit - Remove AA_TempUnit[AA_Index[3]] from the game
                    • Else - Actions
                  • Custom script: call RemoveLocation( udg_AA_Pos[ udg_AA_Index[3]] )
                  • Custom script: call RemoveLocation( udg_AA_Point1[ udg_AA_Index[3]] )
              • -------- =============== --------
              • -------- Removes Yet Another Group Leak : D : D : D --------
              • -------- =============== --------
              • Custom script: call DestroyGroup( udg_AA_Group1[ udg_AA_Index[3]] )
            • Else - Actions
              • Trigger - Turn off (This trigger)
 
Status
Not open for further replies.
Top