• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

auto blink

Status
Not open for further replies.
Level 3
Joined
Aug 4, 2007
Messages
45
May anyone teach me how to do a spell so that whenever I click somewhere with my mouse for my hero to move there, he'll automatically blink therez? (similar to Ichigo's bankai spell in Anime Wars.)
 
Level 9
Joined
May 27, 2006
Messages
498
Variables:
TempPoint - Point variable

  • blinkmove
    • Events
      • Unit - A unit is issued an order targeting a point // (or something like that)
    • Conditions
      • If you need any...
    • Actions
      • Set TempPoint = (Target point of issued order)
      • Unit - Order (Triggering unit) to Stop
      • Unit - Order (Triggering unit) to Night Elves - Warden: Blink TempPoint

This should work...
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,267
I've made this before in Gui, but I used 2 abilities. 1 autocast ability work as a switch to whetever you want to use your blink automatically or not when you move. I cloned faerie fire ability only to function as a autocast switch.

  • Activate Shunpo
    • Events
      • Unit - A unit Is issued an order with no target
      • Conditions
        • Or - Any (Conditions) are true
          • Conditions
            • (Issued order) Equal to (Order(faeriefireon))
            • (Issued order) Equal to (Order(faeriefireoff))
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Issued order) Equal to (Order(faeriefireon))
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Blinker1 Equal to No unit
              • Then - Actions
                • Set Blinker1 = (Triggering unit)
                • Floating Text - Create floating text that reads Shunpo! above (Triggering unit) with Z offset 0.00, using font size 12.00, color (50.00%, 0.00%, 100.00%), and 0.00% transparency
                • 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 fading age of (Last created floating text) to 0.50 seconds
                • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Blinker2 Equal to No unit
                  • Then - Actions
                    • Set Blinker2 = (Ordered unit)
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Blinker3 Equal to No unit
                      • Then - Actions
                        • Set Blinker3 = (Triggering unit)
                      • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • Blinker4 Equal to No unit
                          • Then - Actions
                            • Set Blinker4 = (Triggering unit)
                          • Else - Actions
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • Blinker5 Equal to No unit
                              • Then - Actions
                                • Set Blinker5 = (Triggering unit)
                              • Else - Actions
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • Blinker6 Equal to No unit
                                  • Then - Actions
                                    • Set Blinker6 = (Triggering unit)
                                  • Else - Actions
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Blinker1 Equal to (Ordered unit)
              • Then - Actions
                • Set Blinker1 = No unit
                • Floating Text - Create floating text that reads Relax! above (Triggering unit) with Z offset 0.00, using font size 12.00, color (50.00%, 0.00%, 100.00%), and 0.00% transparency
                • 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 fading age of (Last created floating text) to 0.50 seconds
                • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Blinker2 Equal to (Triggering unit)
                  • Then - Actions
                    • Set Blinker2 = No unit
                  • Else - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • Blinker3 Equal to (Triggering unit)
                      • Then - Actions
                        • Set Blinker3 = No unit
                      • Else - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • Blinker4 Equal to (Triggering unit)
                          • Then - Actions
                            • Set Blinker4 = No unit
                          • Else - Actions
                            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • If - Conditions
                                • Blinker5 Equal to (Triggering unit)
                              • Then - Actions
                                • Set Blinker5 = No unit
                              • Else - Actions
                                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  • If - Conditions
                                    • Blinker6 Equal to (Triggering unit)
                                  • Then - Actions
                                    • Set Blinker6 = No unit
                                  • Else - Actions

  • Shunpo
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Blinker1 Equal to (Ordered unit)
              • Blinker2 Equal to (Ordered unit)
              • Blinker3 Equal to (Ordered unit)
              • Blinker4 Equal to (Ordered unit)
              • Blinker5 Equal to (Ordered unit)
              • Blinker6 Equal to (Ordered unit)
          • (Distance between (Position of (Ordered unit)) and (Target point of issued order)) Greater than 550.00
          • IsShunpo Equal to False
          • (Issued order) Not equal to (Order(attack))
          • (Level of Shunpo (autocast) for (Ordered unit)) Equal to 1
    • Actions
      • Set IsShunpo = True
      • Set ShunpoDestination = (Target point of issued order)
      • Wait 0.36 seconds
      • Unit - Order (Ordered unit) to Night Elf Warden - Blink ShunpoDestination
      • Wait 0.36 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Distance between (Position of (Ordered unit)) and ShunpoDestination) Greater than 150.00
              • (Current order of (Ordered unit)) Not equal to (Order(attack))
        • Then - Actions
          • Unit - Order (Ordered unit) to Move To ShunpoDestination
        • Else - Actions
      • Set IsShunpo = False
      • Wait 0.70 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • IsShunpo Equal to False
              • (Current order of (Triggering unit)) Not equal to (Order(attack))
              • (Current order of (Triggering unit)) Not equal to (Order(stop))
              • (Distance between (Position of (Ordered unit)) and ShunpoDestination) Greater than 200.00
        • Then - Actions
          • Unit - Order (Ordered unit) to Move To ShunpoDestination
        • Else - Actions
I made this long time ago, but now I see the non-MUI ability fucks this up. If several users use this ability, this trigger is NOT RECOMMENDED.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
WHAT THE ********** xD
you didnt read the thread :p
building has blink button when you press it your hero goes near to it
 
Level 27
Joined
Feb 22, 2006
Messages
3,052
Variables:
TempPoint - Point variable

  • blinkmove
    • Events
      • Unit - A unit is issued an order targeting a point // (or something like that)
    • Conditions
      • If you need any...
    • Actions
      • Set TempPoint = (Target point of issued order)
      • Unit - Order (Triggering unit) to Stop
      • Unit - Order (Triggering unit) to Night Elves - Warden: Blink TempPoint

This should work...
You made a variable, but never cleaned the leak...
should be:

  • blinkmove
    • Events
      • Unit - A unit is issued an order targeting a point // (or something like that)
    • Conditions
      • If you need any...
    • Actions
      • Set TempPoint = (Target point of issued order)
      • Unit - Order (Triggering unit) to Stop
      • Unit - Order (Triggering unit) to Night Elves - Warden: Blink TempPoint
      • Custom Script: call RemoveLocation(udg_TempPoint)
--donut3.5--
 
Level 5
Joined
Oct 18, 2007
Messages
139
Wouldn't it be easier to just have

  • Trigger name here
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • Do you need any o-o? Mby add a buff if its temporary
    • Actions
      • Unit - Move (Ordered unit) instantly to (Target point of issued order), facing (Facing of (Ordered unit)) degrees
      • Special Effect - Create a special effect attached to the origin of (Ordered unit) using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
 
Level 9
Joined
May 27, 2006
Messages
498
No, because this will leak (yah, i`ve read the leak-thread xD), cause lag.
Just think about it, when this trigger will be runned (100 (for example) x number of players) times. So there will be 1000 (if there are 10 players) unremoved locations of target of issued order and special effects

Razorbrain, I know it works for you, it should. Leaks are not whether it's working or not, the full name is memory leaks. It's when (example) you create a special effect at the position of a unit. If that location (the position of unit) is not destroyed, it will stay there and take some memory, so when you create lots of these locations, your map will lag like hell. Imagine it like this, try putting 10000 units on a map and test it, it bet it'll lag because each unit takes some memory, and causes the game to leak. Same for Unit Groups, if you go pick every unit, then WE creates a group so he can do what you said, but if that group isn't destroyed, it will leak.


Go read
Things That Leak
or
Triggers - Memory Leaks
 
Status
Not open for further replies.
Top