Dashing out of the map?

Windwalk

New Member
Reaction score
8
2 skills involed.. the mirana like arrow skill and the 2nd skill that dashes to the arrow. It wont dash unless theres an .. problem is even when the arrow is gone and he passes the arrow's last position he keeps dashing.. and dashes out of the map

heres skill 1. the arrow

JASS:
scope ThunderSlash initializer Init

private function ThunderSlash_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A02A'
endfunction

globals
    private constant integer DUMMY_ID = 'h01K' //Dummy ID
    private constant integer ABILITY = 'A02F' //acidbomb ID
    private constant integer DUMMY_IDD = 'h00A' //Dummy ID for the caster
    private constant integer GENERIC = 'BTLF' //Generic timer buff
    private constant real DISTANCE = 20.00 //MAX DISTANCE
    private constant string HITEFFECT = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl" //thunder clap effect
    private constant string MOVEMENTEFFECT = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl" //thunder movement effect
    private unit ky
    private unit caster
    private location ky_l
    private location dummy_l
    private location os_l
    private location tar_l
    private location target_l
    private integer count = 0
    private integer level_k = 0
    private integer gc = 0
    private player op
    private group ky_g = CreateGroup()
    private group target = CreateGroup()
    private timer ky_t = CreateTimer()
    private real au = 0.00
    private real damage_k = 0.00
    private real adding
endglobals

//DO NOT TOUCH ANYTHING BELOW THIS LINE=====================================================

private function booleanftw1 takes nothing returns boolean
    return IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(ky)) and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false
endfunction

private function groupdmg1 takes nothing returns nothing
    set caster = CreateUnitAtLoc(op, DUMMY_IDD, dummy_l, au)
    call UnitAddAbility(caster, ABILITY)
    call UnitApplyTimedLife(caster, GENERIC, 1.00)
    if count <= 200 then
    call SetUnitAbilityLevel(caster, ABILITY, 1)
    else
    endif
    
    if count <= 600 and count > 200 then
    call SetUnitAbilityLevel(caster, ABILITY, 2)
    else
    endif
    
    if count <= 800 and count > 400 then
    call SetUnitAbilityLevel(caster, ABILITY, 3)
    else
    endif
    
    if count <= 1000 and count > 600 then
    call SetUnitAbilityLevel(caster, ABILITY, 4)
    else
    endif
    
    if count <= 1200 and count > 800 then
    call SetUnitAbilityLevel(caster, ABILITY, 5)
    else
    endif
    
    if count <= 1400 and count > 1000 then
    call SetUnitAbilityLevel(caster, ABILITY, 6)
    else
    endif
    
    if count <= 1600 and count > 1200 then
    call SetUnitAbilityLevel(caster, ABILITY, 7)
    else
    endif
    
    if count <= 2400 and count > 1600 then
    call SetUnitAbilityLevel(caster, ABILITY, 8)
    else
    endif
    
    call IssueTargetOrder(caster, "shadowstrike", GetEnumUnit())
    call UnitDamageTargetBJ(ky, GetEnumUnit(), damage_k, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL)
endfunction

private function arrowmovement takes nothing returns nothing
    set count = count + 20
    set dummy_l = GetUnitLoc(udg_ky_dummy1)
    call AddSpecialEffectLoc(MOVEMENTEFFECT, dummy_l)
    set ky_g = GetUnitsInRangeOfLocMatching(82.00, dummy_l, Condition(function booleanftw1))
    set gc = CountUnitsInGroup(ky_g)
    if gc == 0 then
    set os_l = PolarProjectionBJ(dummy_l, DISTANCE, au)
    call SetUnitPositionLoc(udg_ky_dummy1, os_l)
    call RemoveLocation(os_l)
    call RemoveLocation(dummy_l)
    call DestroyEffect(GetLastCreatedEffectBJ())
    else
    set target = GetRandomSubGroup(1, ky_g)
    call AddSpecialEffectLoc(HITEFFECT, dummy_l)
    call ForGroup(target, function groupdmg1)
    call DestroyGroup(target)
    call DestroyGroup(ky_g)
    call RemoveLocation(dummy_l)
    call PauseTimer(GetExpiredTimer())
    call RemoveUnit(udg_ky_dummy1)
    call DestroyEffect(GetLastCreatedEffectBJ())
    endif
    
    if count >= 2400 then 
    call PauseTimer(GetExpiredTimer())
    call RemoveUnit(udg_ky_dummy1)
    set udg_skillison = false
    else
    endif
endfunction

private function ThunderSlash_Actions takes nothing returns nothing
    set ky = GetTriggerUnit()
    set ky_l = GetUnitLoc(ky)
    set tar_l = GetSpellTargetLoc()
    set op = GetOwningPlayer(ky)
    set level_k = GetUnitAbilityLevel(ky, 'A02A')
    set au = AngleBetweenPoints(ky_l, tar_l)
    set damage_k = I2R(level_k)*100
    set count = 0
    set udg_ky_dummy1 = CreateUnitAtLoc(op, DUMMY_ID, ky_l, au)
    set udg_skillison = true
    call RemoveLocation(tar_l)
    call RemoveLocation(ky_l)
    call TimerStart(ky_t, 0.02, true, function arrowmovement)
endfunction

//===========================================================================
public function Init takes nothing returns nothing
    local trigger ThunderSlash = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( ThunderSlash, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( ThunderSlash, Condition( function ThunderSlash_Conditions ) )
    call TriggerAddAction( ThunderSlash, function ThunderSlash_Actions )
endfunction

endscope

2nd skill the dashing one

JASS:
scope SonicDash initializer Init1

private function SonicDashC takes nothing returns boolean
    return GetSpellAbilityId() == 'F00E'
endfunction

globals
    private constant integer BLINKDUMMY = 'h01N'
    private constant real DISTANCE_K = 30.00
    private constant string BLINKEFFECT = "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl"
    private constant string BOLTEFFECT = "Abilities\\Weapons\\Bolt\\BoltImpact.mdl"
    private unit ky_b
    private unit ky_a
    private location ky_loc
    private location ky_a_l
    private location ky_o
    private location s_loc
    private real ky_d
    private real ky_angle
    private real ky_dis
    private integer ky_level
    private timer k_timer_1 = CreateTimer()
    private group ky_g2 = CreateGroup()
endglobals

private function hurray takes nothing returns boolean
    return IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(ky_b)) and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false
endfunction

private function groupdamage11 takes nothing returns nothing
    local location enumloc = GetUnitLoc(GetEnumUnit())
    call UnitDamageTargetBJ(ky_b, GetEnumUnit(), ky_d, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL)
    call AddSpecialEffectLoc(BOLTEFFECT, enumloc)
    set enumloc = null
    call RemoveLocation(enumloc)
endfunction

private function dash takes nothing returns nothing
    local unit dummyhi
    set ky_loc = GetUnitLoc(ky_b)
    set ky_a_l = GetUnitLoc(ky_a)
    set ky_dis = DistanceBetweenPoints(ky_loc, ky_a_l)
    set ky_o = PolarProjectionBJ(ky_loc, DISTANCE_K, ky_angle)
        if ky_dis >= 110.00 then
        set ky_g2 = GetUnitsInRangeOfLocMatching(150.00, ky_loc, Condition(function hurray))
        call ForGroup(ky_g2, function groupdamage11)
        set dummyhi = CreateUnitAtLoc(GetOwningPlayer(ky_b), BLINKDUMMY, ky_loc, ky_angle)
        call AddSpecialEffectLoc(BLINKEFFECT, ky_loc)
        call SetUnitAnimation(dummyhi, "walk")
        call UnitApplyTimedLife(dummyhi, 'BFig', 0.10)
        call SetUnitVertexColorBJ( dummyhi, 100.00, 100.00, 100.00, 50.00 )
        call SetUnitAnimation(ky_b, "walk")
        call SetUnitFacing(ky_b, ky_angle)
        call SetUnitPositionLoc(ky_b, ky_o)
        call RemoveLocation (ky_loc)
        call RemoveLocation(ky_o)
        call DestroyEffect(GetLastCreatedEffectBJ())
        else
        endif
        
        if ky_dis <= 110.00 then
        call SetUnitPathing(ky_b, true)
        call PauseTimer(GetExpiredTimer())
        else
        endif
endfunction

private function SonicDashA takes nothing returns nothing
    if udg_skillison == true then
    set ky_b = GetTriggerUnit()
    set ky_a = udg_ky_dummy1
    set ky_loc = GetUnitLoc(ky_b)
    set ky_a_l = GetUnitLoc(ky_a)
    set ky_angle = AngleBetweenPoints(ky_loc, ky_a_l)
    call RemoveLocation(ky_a_l)
    set s_loc = GetSpellTargetLoc()
    set ky_level = GetUnitAbilityLevel(ky_b, 'F00E')
    set ky_d = I2R(ky_level) * 25
    set ky_dis = DistanceBetweenPoints(ky_loc, ky_a_l)
    call RemoveLocation(ky_loc)
        if ky_dis >= 200 then
        call SetUnitPathing(ky_b, false)
        call TimerStart(k_timer_1, 0.06, true, function dash)
        else
        endif
    else
    endif
endfunction

//===========================================================================
public function Init1 takes nothing returns nothing
    local trigger SonicDash1 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( SonicDash1, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( SonicDash1, Condition( function SonicDashC ) )
    call TriggerAddAction( SonicDash1, function SonicDashA )
endfunction

endscope
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top