• 🏆 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] Why this aint working ?

Status
Not open for further replies.
Level 11
Joined
Jul 28, 2007
Messages
920
Unit is still moving to the position of ability being casted but unit isnt created at that point, unit is created at the center of map. How to fix that ? I can skip storing the point, but then i got leak...

  • Fire Missile Copy
    • Events
      • Unit - A unit Begins casting an ability
      • Unit - A unit Finishes casting an ability
    • Conditions
    • Actions
      • -------- -------------------------Team1------------------------- --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Casting unit)) Equal to (==) PlayerX[1]
              • Multiple ConditionsOr - Any (Conditions) are true
                • Conditions
                  • (Ability being cast) Equal to (==) Fire Missile
                  • (Ability being cast) Equal to (==) Fire Missiles dual
              • Multiple ConditionsOr - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Casting unit)) Equal to (==) |CFFFF8A00Missile Launcher
                  • (Unit-type of (Casting unit)) Equal to (==) |CFFFF8A00Dual Missile Launcher
          • Then - Actions
            • Set CastPoint = (Target point of ability being cast)
            • Unit - Create 1 Dummy (CheckPoint) for PlayerX[1] at CastPoint facing 0.00 degrees
            • Point - Remove CastPoint
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Right Island <gen> contains (Last created unit)) Equal to (==) False
                • Then - Actions
                  • Cinematic - Clear the screen of text messages for (All allies of (Owner of (Casting unit)))
                  • Game - Display to (All allies of (Owner of (Casting unit))) the text: ...
                  • Unit - Remove (Last created unit) from the game
                  • Unit - Pause (Casting unit)
                  • Unit - Order (Casting unit) to Stop
                  • Unit - Unpause (Casting unit)
                  • Wait 0.01 seconds
                  • Unit - Reset ability cooldowns for (Casting unit)
                  • Skip remaining actions
                • Else - Actions
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Right Island <gen> contains (Last created unit)) Equal to (==) True
                    • Then - Actions
                      • Unit - Remove (Last created unit) from the game
                    • Else - Actions
          • Else - Actions
      • -------- no fuel --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Casting unit)) Equal to (==) PlayerX[1]
            • (PlayerX[1] Current lumber) Less than (<) 6
            • (Ability being cast) Equal to (==) Fire Missile
          • Then - Actions
            • Cinematic - Clear the screen of text messages for (All allies of (Owner of (Casting unit)))
            • Game - Display to (All allies of (Owner of (Casting unit))) the text: ...
            • Wait 0.01 seconds
            • Unit - Reset ability cooldowns for (Casting unit)
            • Skip remaining actions
          • Else - Actions
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Casting unit)) Equal to (==) PlayerX[1]
            • (PlayerX[1] Current lumber) Less than (<) 12
            • (Ability being cast) Equal to (==) Fire Missiles dual
          • Then - Actions
            • Cinematic - Clear the screen of text messages for (All allies of (Owner of (Casting unit)))
            • Game - Display to (All allies of (Owner of (Casting unit))) the text: ...
            • Wait 0.01 seconds
            • Unit - Reset ability cooldowns for (Casting unit)
            • Skip remaining actions
          • Else - Actions
      • Wait 0.01 seconds
      • -------- -------------------------Team1------------------------- --------
      • -------- Missile --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Casting unit)) Equal to (==) PlayerX[1]
          • Then - Actions
            • -------- ============Single Missile Level 1 --------
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ability being cast) Equal to (==) Fire Missile
                    • Multiple ConditionsOr - Any (Conditions) are true
                      • Conditions
                        • (Unit-type of (Casting unit)) Equal to (==) |CFFFF8A00Missile Launcher
                • Then - Actions
                  • Set Point_1 = (Target point of ability being cast)
                  • -------- missile --------
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Multiple ConditionsOr - Any (Conditions) are true
                          • Conditions
                            • (Unit-type of (Casting unit)) Equal to (==) |CFFFF8A00Missile Launcher
                      • Then - Actions
                        • Set Point = (Position of (Casting unit))
                        • Unit - Create 1 |CFFFF8A00Missile (light) for Neutral Victim at (Point offset by (Real(MissileLaunch_poz_X)) towards 0.00 degrees) facing 0.00 degrees
                        • Point - Remove Point
                      • Else - Actions
                  • Animation - Change (Last created unit) flying height to 400.00 at 200.00
                  • Unit - Order (Last created unit) to Neutral - Kaboom! Point_1
                  • Point - Remove Point_1
                  • Player - Set PlayerX[1] Current lumber to ((PlayerX[1] Current lumber) - 6)
                  • -------- - --------
                  • Floating Text - Create floating text that reads -6E above (Casting unit) with Z offset 0.00, using font size 11.00, color (100.00%, 60.00%, 0.00%), and 0.00% transparency
                  • Floating Text - Hide (Last created floating text) for (All enemies of (Player((Player number of PlayerX[1]))))
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
                • Else - Actions
            • -------- ============Dual Missile Level 2 --------
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ability being cast) Equal to (==) Fire Missiles dual
                    • Multiple ConditionsOr - Any (Conditions) are true
                      • Conditions
                        • (Unit-type of (Casting unit)) Equal to (==) |CFFFF8A00Dual Missile Launcher
                • Then - Actions
                  • Set Point_1 = (Target point of ability being cast)
                  • -------- missile --------
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Multiple ConditionsOr - Any (Conditions) are true
                          • Conditions
                            • (Unit-type of (Casting unit)) Equal to (==) |CFFFF8A00Dual Missile Launcher
                      • Then - Actions
                        • Set Point = (Position of (Casting unit))
                        • Unit - Create 1 |CFFFF8A00Missile (light) for Neutral Victim at (Point offset by ((Real(MissileLaunch_poz_X)), (Real(MissileLaunch_poz_Y)))) facing 0.00 degrees
                        • Point - Remove Point
                      • Else - Actions
                  • Animation - Change (Last created unit) flying height to 400.00 at 200.00
                  • Unit - Order (Last created unit) to Neutral - Kaboom! (Point_1 offset by 40.00 towards 90.00 degrees)
                    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Multiple ConditionsOr - Any (Conditions) are true
                          • Conditions
                            • (Unit-type of (Casting unit)) Equal to (==) |CFFFF8A00Dual Missile Launcher
                      • Then - Actions
                        • Set Point = (Position of (Casting unit))
                        • Unit - Create 1 |CFFFF8A00Missile (light) for Neutral Victim at (Point offset by ((Real(MissileLaunch_poz_X)), (Real(MissileLaunch_neg_Y)))) facing 0.00 degrees
                        • Point - Remove Point
                      • Else - Actions
                  • Animation - Change (Last created unit) flying height to 400.00 at 200.00
                  • Unit - Order (Last created unit) to Neutral - Kaboom! (Point_1 offset by 40.00 towards 270.00 degrees)
                  • Point - Remove Point_1
                  • Player - Set PlayerX[1] Current lumber to ((PlayerX[1] Current lumber) - 12)
                  • -------- - --------
                  • Floating Text - Create floating text that reads -12E above (Casting unit) with Z offset 0.00, using font size 11.00, color (100.00%, 60.00%, 0.00%), and 0.00% transparency
                  • Floating Text - Hide (Last created floating text) for (All enemies of (Player((Player number of PlayerX[1]))))
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
                • Else - Actions
          • Else - Actions
 

Ham

Ham

Level 5
Joined
Jan 16, 2009
Messages
132
bboy-tiger- i tihnk your in the wrong forum, this forum supports trigger making, must not trigger fixing / editing, go into trigger section
 
Level 9
Joined
May 30, 2008
Messages
430
First of all this trigger leaks at alot points (hmm you are removing the leaks with very strange way i don't know if this work) and second this does't look like moving trigger 2 me perhaps it may not be :confused: (becouse of that i won't explore what u are trying 2 do)
 
Level 11
Joined
Jul 28, 2007
Messages
920
Ups, y wrong forum... ccc, works fine now, just had to remove finishing casting, i think it works fine, and dunno about leaks, how would you remove them -.-', i checked for leaks in leakchecker after i made this trigger, shows no leaks.

After unit casts spell, there is another unit created at the point of casting unit, then this unit is forced to move at the position oftarget ability being casted. Point are stored and removed here. ehm...

btw wait actions are disabled.

Point - Remove Point_1 works same as " call RemoveLocation( udg_CastPoint )"
 
Status
Not open for further replies.
Top