Suckback

Chaos_Knight

New Member
Reaction score
39
Okay, i was thinking of a suckinto spell. Like a knockback, but whole around.
The spell sucks in every unit in range of the target point, and deals damage per second. Can someone help me?
Yes, DotA players, i wanna create Engimas "Black Hole".

//Chaos_Knight
 

hgkjfhfdsj

Active Member
Reaction score
55
Not sure if this will be of help...
Extracted from Triggered Skills Explained
Based on Tornado. This provides the duration and summoned unit.

When blackhole is casted, check if it's casted inside of the playable area, or inside of the places where you can't black hole, if it is, then stop Enigma and put the "Cannot cast Black Hole here" error message.

When the tornado is summoned, a dummy unit is created, added a Fog ability (A0X4 if Enigma is Sentinel, A0X3 if Enigma es Scourge) and told to use it on the spot that Black Hole was summoned, "BlackHole" (the Tornado) is saved to the cache, it then creates a new trigger with two events (2), one is the death of the tornado, the other being a timed event every 0.05 seconds. It also assigns the level of the tornado damage aura of the tornado to that of Black Hole's level.

(2): This new function first checks if it has been called because of the unit's death, if it has, then the trigger is destroyed. If it's because of the timed event, recover the BlackHole from the cache, then count every non dummy, non structure, non ancient (except Spirit Bear) enemy unit. For each unit, Set the unit's position to the distance from Black Hole to the unit -2 keeping the same angle (SetUnitPositionLoc reset the commands you have done).

The Fog abillity lasts for 4 seconds, A0X4 targets Friend, while A0X3 targets enemies, it has a 400 AoE. Note that items abilities can be casted while in the blackhole, but you also need to be facing enigma.

The Places where you can't blackhole:
1.-The waterfall at the left sentinel base entrance
2.-The other waterfall at the bottom sentinel base entrance
3.-To the leftest place on the river, you can't cast it there (well, there's a place there where you can cast it and leave people stuck though, the rectangle checked is too small)
4.-To the rightest of the river (this one has a good check)

you can try a knockback system... with:
Set the unit's position to the distance from Black Hole to the unit -2 keeping the same angle (SetUnitPositionLoc reset the commands you have done).
 

Chaos_Knight

New Member
Reaction score
39
Well, that was.. Cool. But still i was thinking of using a negative knockback.
Damn it, i cant figure out how to make this. :banghead:
 

killingdyl

Active Member
Reaction score
6
this is the basics of the knockback trigger, you can add a periodic and lower the value(25) to get a smoother looking slide. you can also add a loop to make them knockback farther each time.
JASS:
   set x = GetUnitX(target)
            set y = GetUnitY(target)
            set rad = Atan2(y - yt, x- xt) //yt and xt are the x and y of the caster unit
            set x = x + 25 * Cos(rad)
            set y = y + 25 * Sin(rad)
            call SetUnitPosition(target, x, y)
 

Chaos_Knight

New Member
Reaction score
39
Blackhole by emjlr3 >> perhaps work from that??

Hey, i imported it and compiled and i changed a little, but it doesnt suck the targets. It creates the dummy. :(

JASS:
library BlackHole initializer InitTrig requires TT

//******************************************************************************************
//*
//*  Blackhole - By emjlr3, Original seen in DotA Allstars
//*
//*  Summon a black hole from the darkest abyss, which sucks enemy units into
//*  its center, dealing damage over time. 
//* 
//*  Requires:
//*    - "TT" trigger copied to your map, if not already there
//*    - The "Black Hole" ability copied to your map
//*    - The "Black Hole (Dummy)" ability copied to your map
//*    - The "Black Hole" buff copied to your map, set as the previous abilities buff
//*    - The "Black Hole" unit copied to your map, with the "Black Hole (Dummy)" ability added to it
//*    - A vJASS Preprocessor
//*
//******************************************************************************************

globals
    // Config. Globals:
    private constant integer abil_id = 'A00A' // Black Hole ability rawcode
    private constant integer dummy_id = 'u003' // Black Hole unit rawcode
    private constant real pull = 50.5 // Distance pulled/interval
    private constant boolean fight = false // Whether units can fight against the pull
    private constant string sfx = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl" // Effect created on pulled units
    
    // Needed Globals:
    public trigger Trigger = null // Output trigger will be BlackHole_Trigger, which can be used publically
    private group G = CreateGroup()
    private player P = null
    private real X
    private real Y
endglobals
// Config. Functions:
private function Range takes integer lvl returns real
    return 400. // Area for pull/lvl
endfunction
// Damage is found on the Black Hole (Dummy) ability

private struct data
    unit hole
    unit u
    player p
    integer lvl
    real x
    real y
endstruct

private function Conditions takes nothing returns boolean
    return GetUnitTypeId(GetSummonedUnit())==dummy_id
endfunction
private function Filt takes nothing returns boolean
    return GetWidgetLife(GetFilterUnit())>.405 and not IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE) and IsUnitEnemy(GetFilterUnit(),P)
endfunction
private function Effects takes nothing returns nothing
    local real x 
    local real y
    local real ang
    
    set bj_ghoul[25] = GetEnumUnit()
    set x = GetUnitX(bj_ghoul[25])
    set y = GetUnitY(bj_ghoul[25])
    set ang = Atan2(Y-y,X-x)
    if fight then
        call SetUnitX(bj_ghoul[25],x+pull*Cos(ang))
        call SetUnitY(bj_ghoul[25],y+pull*Sin(ang))
    else
        call SetUnitPosition(bj_ghoul[25],x+pull*Cos(ang),y+pull*Sin(ang))
    endif
    call DestroyEffect(AddSpecialEffectTarget(sfx,bj_ghoul[25],"origin"))
endfunction
private function Movement takes nothing returns boolean
    local data d = TT_GetData()
    
    if GetWidgetLife(d.hole)<.405 then
        call d.destroy()
        return true
    endif
    
    call GroupClear(G)
    set P = d.p
    set X = d.x
    set Y = d.y
    call GroupEnumUnitsInRange(G,d.x,d.y,Range(d.lvl),Condition(function Filt))
    call ForGroup(G,function Effects)
    return false
endfunction
private function Actions takes nothing returns nothing
    local data d = data.create()
    
    set d.hole = GetSummonedUnit()
    set d.x = GetUnitX(d.hole)
    set d.y = GetUnitY(d.hole)
    set d.u = GetSummoningUnit()
    set d.p = GetOwningPlayer(d.u)
    set d.lvl = GetUnitAbilityLevel(d.u,abil_id)
    call TT_Start(function Movement,d)
endfunction

//===========================================================================
public function InitTrig takes nothing returns nothing
    local trigger Trigger = CreateTrigger( )
    call TriggerRegisterAnyUnitEventBJ( Trigger, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( Trigger, Condition( function Conditions ) )
    call TriggerAddAction( Trigger, function Actions )
endfunction

endlibrary
 
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