[Solved] Blink without exploring region first

Status
Not open for further replies.
Level 2
Joined
Sep 1, 2023
Messages
7
Hey guys as you know blinking without exploring a part of map wont work, any ideas to bypass it?
 

Attachments

  • blink.jpg
    blink.jpg
    270.5 KB · Views: 11

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
The exploration requirement of Blink is hardcoded into the ability itself. Other Point-targeted abilities, like Carrion Swarm for example, don't have this behavior.

So the solution is simple, use a different ability and trigger the effects yourself. Fortunately, Blink is a rather simple spell to trigger yourself:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to YourOtherAbility
  • Actions
    • Unit - Move (Triggering unit) instantly to (Target point of ability being cast)
That's the basic logic.

But an issue arises. Moving a unit instantly will cause it to issue a Stop order which will interrupt the Cooldown stage of the spell. This means that the trigger will work but the ability won't have fully processed all of it's intended effects like going on cooldown. The solution is to manually put the ability on cooldown:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to YourOtherAbility
  • Actions
    • Unit - For Unit (Triggering unit), start cooldown of ability (Ability being cast) over 5.00 seconds
    • Unit - Move (Triggering unit) instantly to (Target point of ability being cast)
Note: You probably want to modify the 5.00 second cd to vary based on the level of the ability being cast.

For the pretty special effects of Blink (the blue burst in/out) you can use the Special Effect actions:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to YourOtherAbility
  • Actions
    • Unit - For Unit (Triggering unit), start cooldown of ability (Ability being cast) over 5.00 seconds
    • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\NightElf\Blink\BlinkArea.mdl
    • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
    • Unit - Move (Triggering unit) instantly to (Target point of ability being cast)
This should work fine, however, the trigger has memory leaks. To address these, we can incorporate some variables and Destroy our leakable objects (Points and Special Effects) once we're done using them:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to YourOtherAbility
  • Actions
    • Unit - For Unit (Triggering unit), start cooldown of ability (Ability being cast) over 5.00 seconds
    • Set Variable TempPointA = (Position of (Triggering unit))
    • Set Variable TempPointB = (Target point of ability being cast)
    • Special Effect - Create a special effect at TempPointA using Abilities\Spells\NightElf\Blink\BlinkArea.mdl
    • Special Effect - Destroy (Last created special effect)
    • Special Effect - Create a special effect at TempPointB using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
    • Special Effect - Destroy (Last created special effect)
    • Unit - Move (Triggering unit) instantly to TempPointB
    • Custom script: call RemoveLocation( udg_TempPointA )
    • Custom script: call RemoveLocation( udg_TempPointB )
If the memory leak stuff confuses you then feel free to skip it for now. It's more of an advanced technique for keeping your map running well.

Blink also has a Minimum/Maximum Range, which if added to the trigger will add some extra complexity - nothing too crazy though and with experience this type of trigger should only take a few minutes to make.

Edit:
I attached a map with a triggered Blink that very closely resembles the original ability. The only thing different is the timing which seems slightly off but I think it works great as is.
 

Attachments

  • Blink Triggered.w3m
    20.4 KB · Views: 7
Last edited:
Status
Not open for further replies.
Top