Blink Strike?

Heizo

New Member
Reaction score
0
Ok, I have an ability that I can't figure out how to goet to work. I want my hero (Blademaster of the Blackrock Clan is model...idk if that has anything to do with it) to blink to the target, strike it, and blink back to where it was. Help?
 

Hildagarn

Member
Reaction score
20
Trigger:
  • Events - A unit begins casting an ability
    • Conditions - Ability equal to Blink Strike
    • Actions - Set Blinkpoint (1)= Position of (Target unit of ability being cast)
      • Set Blinkpoint (2)= Position of (casting unit)
      • Create special effect using (blink thingy) at Blinkpoint (2)
      • Move Casting unit instantly to Blinkpoint (1)
      • -Damage goes here-
      • Create Special effect using (blink thingy) at Blinkpoint (1)
      • Move Casting unit instantly to Blinkpoint (2)

Win?
 

jig7c

Stop reading me...-statement
Reaction score
123
you ahve to trigger the whole thing...

make a dummy ability based off blink which sets the range of the blink, and cooldown/mana...
then trigger the thing...

Trigger:
  • untitled trigger
    • event
      • a unit starts the effect of an ability
    • condition
      • ability being cast equal to blink strike
    • action
      • set unit[0] = (triggering unit)
      • set point[0] = (position of (triggering unit))
      • set unit[1] = (target unit of ability being cast on)
      • set point[1] = (position of (target unit of ability being cast on))
      • set bsdmg = (50 * (level of blink strike)
      • move unit[0] instantly to point[1]
      • order unit[0] to damage bsdmg amount to unit[1]
      • move unit[0] to point[0]
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Here's a GUI version, fully completed:
Trigger:
  • Blink Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Blink Strike
    • Actions
      • Set tempPoint[0] = (Position of (Casting unit))
      • Set tempPoint[1] = (Position of (Target unit of ability being cast))
      • Special Effect - Create a special effect at tempPoint[0] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Move (Casting unit) instantly to tempPoint[1]
      • Special Effect - Create a special effect at tempPoint[1] using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Order (Casting unit) to Attack (Target unit of ability being cast)
      • Special Effect - Create a special effect at tempPoint[1] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Move (Casting unit) instantly to tempPoint[0]
      • Special Effect - Create a special effect at tempPoint[0] using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_tempPoint[0])
      • Custom script: call RemoveLocation(udg_tempPoint[1])


And here's the JASS version:
JASS:
scope BlinkStrike initializer Init
    
    globals
        private constant integer BSID = 'A000'
        //Rawcode of the 'Blink Strike' ability
        
        private constant string SFXSTART = "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl"
        //Path for the SFX at the start of the blink
        
        private constant string SFXEND = "Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl"
        //Path for the SFX at the end of the blink
    endglobals
    
    private function Conditions takes nothing returns boolean
        local unit cu = GetSpellAbilityUnit()
        local unit tu = GetSpellTargetUnit()
        local real cux = GetUnitX(cu)
        local real cuy = GetUnitY(cu)
        local real tux = GetUnitX(tu)
        local real tuy = GetUnitY(tu)
                
        if (GetSpellAbilityId() == BSID) then
            call DestroyEffect(AddSpecialEffect(SFXSTART, cux, cuy))
            call SetUnitPosition(cu, tux, tuy)
            call DestroyEffect(AddSpecialEffect(SFXEND, tux, tuy))
            call IssueTargetOrder(cu, "attack", tu)
            call DestroyEffect(AddSpecialEffect(SFXSTART, GetUnitX(cu), GetUnitY(cu)))
            call SetUnitPosition(cu, cux, cuy)
            call DestroyEffect(AddSpecialEffect(SFXEND, cux, cuy))
        endif
        set cu = null
        set tu = null
        return false
    endfunction
    
//===========================================================================
    private function Init takes nothing returns nothing
        local trigger t = CreateTrigger()
        
        call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
        call TriggerAddCondition(t, Condition(function Conditions))
    endfunction
    
endscope
 

jig7c

Stop reading me...-statement
Reaction score
123
ur trigger doesn't make sense, in a funny way....

Trigger:
  • Unit - Move (Casting unit) instantly to tempPointtt[0]

i know its a typo :)
needs to be tempPoint[0]
 

vypur85

Hibernate
Reaction score
803
You might want to probably add a little wait in between. Moving the unit to and fro instantly is like... not moving at all, if you know what I mean :p.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top