• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Spell problems.

Status
Not open for further replies.
Level 6
Joined
Oct 4, 2011
Messages
226
This ability is supposed to be a homing, start out at about 600 missle speed and increase to 1600 missle speed, doing base dmg and 1x inteligence when the target is hit. I have made this today but so far have not made it work, it doesn't ever move so something is probably wrong with my loop trigger. Any help would be great I have triggerer's block atm and cant find my mistake.
  • Bird of Prey
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bird of Prey (White Wizard)
    • Actions
      • Set TempUnit = (Casting unit)
      • Set TempPlayer = (Owner of TempUnit)
      • Set TempInteger = (Level of Bird of Prey (White Wizard) for TempUnit)
      • Set TempLocation = (Position of TempUnit)
      • Set TempUnit2 = (Target unit of ability being cast)
      • Set TempLocation2 = (Position of TempUnit2)
      • Set TempReal = (Angle from TempLocation to TempLocation2)
      • Unit - Create 1 Bird of Prey (Dummyl) for TempPlayer at TempLocation facing TempReal degrees
      • Animation - Change (Last created unit)'s size to ((100.00 + ((Real(TempInteger)) x 50.00))%, (100.00 + ((Real(TempInteger)) x 50.00))%, (100.00 + ((Real(TempInteger)) x 50.00))%) of its original size
      • Set TempUnit3 = (Last created unit)
      • Custom script: set udg_AA03_IdInteger = GetHandleId(udg_TempUnit3)
      • Unit Group - Add TempUnit3 to AA03_DummyGroup
      • Hashtable - Save Handle OfTempUnit2 as 1 of AA03_IdInteger in AA99_Hash
      • Hashtable - Save Handle OfTempUnit as 3 of AA03_IdInteger in AA99_Hash
      • Hashtable - Save 18.18 as 4 of AA03_IdInteger in AA99_Hash
      • Hashtable - Save 0.27 as 5 of AA03_IdInteger in AA99_Hash
      • Hashtable - Save (((Real(TempInteger)) x 50.00) + (25.00 + (Real((Intelligence of TempUnit (Include bonuses)))))) as 6 of AA03_IdInteger in (Last created hashtable)
      • Trigger - Turn on (This trigger)
  • Bird of Prey loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in AA03_DummyGroup) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in AA03_DummyGroup and do (Actions)
            • Loop - Actions
              • Set TempUnit = (Picked unit)
              • Custom script: set udg_AA03_IdInteger = GetHandleId(udg_TempUnit)
              • Set TempLocation = (Position of TempUnit)
              • Set TempLocation2 = (Position of (Load 1 of AA03_IdInteger in AA99_Hash))
              • Set TempReal4 = (Angle from TempLocation to TempLocation2)
              • Set TempReal2 = (Load 4 of AA03_IdInteger from AA99_Hash)
              • Set TempLocation3 = (TempLocation offset by TempReal2 towards TempReal4 degrees)
              • Set TempReal = (Distance between TempLocation and TempLocation2)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TempReal Less than or equal to TempReal2
                • Then - Actions
                  • Unit - Move TempUnit instantly to TempLocation2
                  • Unit Group - Remove TempUnit from AA03_DummyGroup
                  • Unit - Remove TempUnit from the game
                  • Unit - Cause (Load 3 of AA03_IdInteger in AA99_Hash) to damage (Load 1 of AA03_IdInteger in AA99_Hash), dealing (Load 6 of AA03_IdInteger from AA99_Hash) damage of attack type Hero and damage type Normal
                  • Hashtable - Clear all child hashtables of child AA03_IdInteger in AA99_Hash
                • Else - Actions
                  • Set TempReal3 = (Load 5 of AA03_IdInteger from AA99_Hash)
                  • Unit - Move TempUnit instantly to TempLocation3, facing TempReal4 degrees
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TempReal3 Greater than 0.00
                    • Then - Actions
                      • Hashtable - Save (TempReal3 - 0.03) as 5 of AA03_IdInteger in AA99_Hash
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • TempReal2 Less than 48.48
                        • Then - Actions
                          • Hashtable - Save (TempReal2 + 10.10) as 4 of AA03_IdInteger in AA99_Hash
                          • Hashtable - Save 0.27 as 5 of AA03_IdInteger in AA99_Hash
                        • Else - Actions
                          • Hashtable - Save 0.27 as 5 of AA03_IdInteger in AA99_Hash
        • Else - Actions
          • Custom script: call RemoveLocation(udg_TempLocation)
          • Custom script: call RemoveLocation(udg_TempLocation2)
          • Custom script: call RemoveLocation(udg_TempLocation3)
          • Trigger - Turn off (This trigger)
:ogre_love:
 
Status
Not open for further replies.
Top