Warcraft III resources & community, 2003–2006 · archived

Boomerang Axes

4.64 / 5 (14)
Submitted by Darky29JASS Enhanced2,350 downloads403 KB
Screenshot
Screenshot
Demomap for the Ability "Boomerang Axes"

Boomerang Axes is used for the Campaign "Day of the Fish"

http://dayofthefish.wc3sear.ch/

Email: [email protected]
File Name
boomerang.w3x
Author
Darky28
Download

Comments

41
can any1 tell me how to put these spells in



is there a way i can replace the ax with a glave cause ive been wanting to make a boomerange glave item that apears in you hands and gives you a boomerange attack
Very nice !
Just one thing.. the sound when it hurt target, put a sound from combat folder, like MetalHeavySliceFlesh1.wav or something like that.
Original:
function Trig_Boomerang_Axes_Actions takes nothing returns nothing
    local unit           u   = GetSpellAbilityUnit()
    local location       pos = GetUnitLoc(u)
    local timer          t1  = CreateTimer()
    local timer          t2  = CreateTimer()
    local trigger        tr1 = CreateTrigger()
    local trigger        tr2 = CreateTrigger()
    local gamecache      g   = GetBoomerangAxesGameCache()
    local integer        i   = 1
    local unit array     b
    local location array l
    set l[1]  = PolarProjectionBJ(pos, 80.00, GetUnitFacing(u)-35)
    set l[2]  = PolarProjectionBJ(pos, 80.00, GetUnitFacing(u)+35)
    set l[3]  = PolarProjectionBJ(pos, BoomerangAxesDistance(), GetUnitFacing(u)-BoomerangAxesAngle())
    set l[4]  = PolarProjectionBJ(pos, BoomerangAxesDistance(), GetUnitFacing(u)+BoomerangAxesAngle())
    set l[5]  = PolarProjectionBJ(l[3], BoomerangAxesRadius(), GetUnitFacing(u)-90)
    set l[6]  = PolarProjectionBJ(l[3], BoomerangAxesRadius(), GetUnitFacing(u)+90)
    set l[7]  = PolarProjectionBJ(l[4], BoomerangAxesRadius(), GetUnitFacing(u)-90)
    set l[8]  = PolarProjectionBJ(l[4], BoomerangAxesRadius(), GetUnitFacing(u)+90)
    set l[9]  = PolarProjectionBJ(l[3], BoomerangAxesRadius(), GetUnitFacing(u)-90-(AngleBetweenPoints(pos, l[3]) - AngleBetweenPoints(pos, l[5])))
    set l[10]  = PolarProjectionBJ(l[3], BoomerangAxesRadius(), GetUnitFacing(u)+90+(AngleBetweenPoints(pos, l[3]) - AngleBetweenPoints(pos, l[5])))
    set l[11]  = PolarProjectionBJ(l[4], BoomerangAxesRadius(), GetUnitFacing(u)-90-(AngleBetweenPoints(pos, l[3]) - AngleBetweenPoints(pos, l[5])))
    set l[12]  = PolarProjectionBJ(l[4], BoomerangAxesRadius(), GetUnitFacing(u)+90+(AngleBetweenPoints(pos, l[3]) - AngleBetweenPoints(pos, l[5])))
    set b[1] = CreateUnitAtLoc(GetOwningPlayer(u), 'e000', l[1], 0)
    set b[2] = CreateUnitAtLoc(GetOwningPlayer(u), 'e001', l[2], 0)
    call TriggerRegisterTimerExpireEventBJ( tr1, t1 )
    call TriggerRegisterTimerExpireEventBJ( tr2, t2 )
    call TriggerAddAction( tr1, function BoomerangAxesTimer )
    call TriggerAddAction( tr2, function BoomerangAxesTimer )
    call StoreIntegerBJ( 1, I2S(BoomerangH2I(tr1)), "direction", g )
    call StoreIntegerBJ( 0, I2S(BoomerangH2I(tr2)), "direction", g )
    call StoreIntegerBJ( BoomerangH2I(b[1]), I2S(BoomerangH2I(tr1)), "unit", g )
    call StoreIntegerBJ( BoomerangH2I(b[2]), I2S(BoomerangH2I(tr2)), "unit", g )
    call StoreIntegerBJ( BoomerangH2I(u), I2S(BoomerangH2I(tr1)), "ounit", g )
    call StoreIntegerBJ( BoomerangH2I(u), I2S(BoomerangH2I(tr2)), "ounit", g )
    call StoreIntegerBJ( BoomerangH2I(CreateGroup()), I2S(BoomerangH2I(tr1)), "group", g )
    call StoreIntegerBJ( BoomerangH2I(CreateGroup()), I2S(BoomerangH2I(tr2)), "group", g )
    call StoreIntegerBJ( 1, I2S(BoomerangH2I(tr1)), "mode", g )
    call StoreIntegerBJ( 1, I2S(BoomerangH2I(tr2)), "mode", g )
    call StoreStringBJ( I2S(BoomerangH2I(tr2)), I2S(BoomerangH2I(tr1)), "other", g )
    call StoreStringBJ( I2S(BoomerangH2I(tr1)), I2S(BoomerangH2I(tr2)), "other", g )
    call StoreBoomerangAxePoint(I2S(BoomerangH2I(tr1)),"s",pos)
    call StoreBoomerangAxePoint(I2S(BoomerangH2I(tr2)),"s",pos)
    call StoreBoomerangAxePoint(I2S(BoomerangH2I(tr1)),"o",l[2])
    call StoreBoomerangAxePoint(I2S(BoomerangH2I(tr2)),"o",l[1])
    call StoreBoomerangAxePoint(I2S(BoomerangH2I(tr1)),"",l[3])
    call StoreBoomerangAxePoint(I2S(BoomerangH2I(tr2)),"",l[4])
    call StoreBoomerangAxePoint(I2S(BoomerangH2I(tr1)),"t1",l[9])
    call StoreBoomerangAxePoint(I2S(BoomerangH2I(tr2)),"t2",l[11])
    call StoreBoomerangAxePoint(I2S(BoomerangH2I(tr1)),"t2",l[10])
    call StoreBoomerangAxePoint(I2S(BoomerangH2I(tr2)),"t1",l[12])
    call StartTimerBJ( t1, true, 0.03 )
    call StartTimerBJ( t2, true, 0.03 )
    call RemoveLocation(pos)
    loop
        exitwhen i > 12
        call RemoveLocation(l[i])
        set i = i + 1
    endloop
    call TriggerSleepAction( 0.00 )
    call PauseUnitBJ( true, u )
endfunction


Fixed:
function GoldenAxes_Actions takes nothing returns nothing 
    local unit u = GetSpellAbilityUnit() 
    local real x = GetUnitX(u) 
    local real y = GetUnitY(u) 
    local location l = GetSpellTargetLoc() 
    local real x2 
    local real y2 
    local real a = AngleBetweenCoordinates(x, y, GetLocationX(l), GetLocationY(l)) 
    local real a2 
    local player p = GetOwningPlayer(u) 
    local timer t1 = CreateTimer() 
    local timer t2 = CreateTimer() 
    local string st1 = I2S(H2I(t1)) 
    local string st2 = I2S(H2I(t2)) 
    local group grp = CreateGroup() 

    call RemoveLocation(l) 
    set l = null 

    call AttachInt(st1, "direction", 1) 
    call AttachInt(st2, "direction", 0) 
    call AttachInt(st1, "mode", 1) 
    call AttachInt(st2, "mode", 1) 
    call AttachObject(st1, "ounit", u) 
    call AttachObject(st2, "ounit", u) 
    call AttachObject(st1, "group", grp) 
    call AttachObject(st2, "group", grp) 
    call AttachString(st1, "other", st2) 
    call AttachString(st2, "other", st1) 

    call AttachObject(st1, "unit", CreateUnit(p, 'u008', ProjectX(x, 80, a-60), ProjectY(y, 80, a-60), 0)) 
    call AttachObject(st2, "unit", CreateUnit(p, 'u008', ProjectX(x, 80, a+60), ProjectY(y, 80, a+60), 0)) 
    set x2 = ProjectX(x, 400, a-18) 
    set y2 = ProjectY(y, 400, a-18) 
    call AttachPoint(st1, "", x2, y2) 
    set a2 = AngleBetweenCoordinates(x, y, x2, y2) - AngleBetweenCoordinates(x, y, ProjectX(x2, 200, a-90), ProjectY(y2, 200, a-90)) 
    call AttachPoint(st1, "t1", ProjectX(x2, 200, a-90-a2), ProjectY(y2, 200, a-90-a2)) 
    call AttachPoint(st1, "t2", ProjectX(x2, 200, a+90+a2), ProjectY(y2, 200, a+90+a2)) 
    set x2 = ProjectX(x, 400, a+18) 
    set y2 = ProjectY(y, 400, a+18) 
    call AttachPoint(st2, "", x2, y2) 
    call AttachPoint(st2, "t2", ProjectX(x2, 200, a-90-a2), ProjectY(y2, 200, a-90-a2)) 
    call AttachPoint(st2, "t1", ProjectX(x2, 200, a+90+a2), ProjectY(y2, 200, a+90+a2)) 
    call TimerStart(t1, .03, true, function GoldenAxes_Handler) 
    call TimerStart(t2, .03, true, function GoldenAxes_Handler) 
endfunction


You are storing all kinds of data that you don't even need, recalculating a ton of data you could simply derive once and store in a variable, using a bunch of locations for no reason, leaking in several places, etc. You did a great job with the math, but the rest of it is horrible.
perfect but i downloaded 3 times there was this problem when i opened it
"Unexpected end of archive! Either multipart or corrupt ZIP archive"

thanks in advance for the replay of this problem
I am working on a similar spell :wink:
Rating (5/5)
just a thought... I have come across this in my previous spells, the SPELL ID in the object editor, where it shows wut casts wut, in a sense... hard to explain, but anyways, its like "SPELL ID - Turn on/use, SPELL ID - Turn off, SPELL ID - autocast" or something like that... The last time I did this, there was the command "Attack" in it, and every time i attacked, it casted the spell, so maybe if this works, have it be on attack, and have no cooldown, or wutever works, and see if he'll do it when he attacks, if not, i failed.... 5/5 on this spell, theres not enough tree-cutters, or dual boomerang spells either, this is two birds with one stone, great!
Very nice Darky. :D :D :D :D :D
As for the spider attack idea, you could use that to create the look of this spell. All you wold need to do is have the spider attack target an invisable unit, and using accurate waits, keep moving the invisable unit into the appropriate positions so the spider missile will immitate the path, and then stop the invisable unit after either loop, being lined up with the caster, and let the projectile hit him, and then the axe will return. It won't do damage, but that is how you could immitate this with spider attack. That would be too difficult either way though so, just forget it... :)
that's another thing... why doesn't spider attack flatten out the regular missle like all the other ones?
Just one problem; if you use axethrow, and it goes of the edge of the map it does not return, and axey is permenantly paused.
great otherwise :D 5/5
The Spider attack ability is so cool, however, you can't do what you're thinking of, unfortunatly. The spider attack projectile only emits a single projectile in a straight line, doesn't hit things in its path, STICKS the projectile to 0 fly height, and comes back after it hits the target, and only a target. So you can't cast at a point, and the thing won't arc, etc etc...
Now that I think of it... couldn't you used the spider attack ability, and some how tweak it so damage is done to units in a line? That way the missle returns to it's owner?
Idea 5/5
Graphics 5/5
Details 5/5

Total 5/5 PERFECT!!!!!!! :D :D :D :D :D
just change the damage type , it determines if hurts immune units or not
Why didnt you try to add this spell? :roll: It's not hard!

What a good spell, ^^ I 'm thinking for my new Hero in my map! Thanks Darky28 much
@darky u didnt answer my question:
darky can u make this spell in my map pls
because its a bit 2 much difficult for me so pls answer me
Well, I don't like the fact that it pauses him, but the new animation looks nice, if a little lifeless. And btw, Ark, I was the one who suggested a boomerang as a basic attack... I just now tried it as an orb ability, didn't work, unfortunatly, so I guess I'll just have to try to make my own boomerang attack from scratch since I can't make heads from tails with JASS.

The only gripe I have about the spell is still, not checking to damage spell immune units, like the golem. And the fact that if your target is standing in the right place, the axes will miss him completely. Besides that, nice work.
Perfect! I like the new animation, and it is good that it pauses him. Sweet job. I dunno if you took my advice for the new animation or not but it is beautiful 8) . Somebody said it would be cool if it was an attack. That would be easy enough. Just use the Orb of Lightning ability thing and change the casted ability to the double axes ability, and the triggers will take care of the rest. That WOULD make a sweet normal attack. The only thing left that I don't like is the effects it makes on contact with units, but I guess I'm the only person who thinks that so 5/5 easily.
Not sure if you noticed but the axes only return to the point where they were casted, maybe if you can get them to move back to the rager no matter where he is, then it will be perfect.
ah k yes its fixed
if i now dl it new its fixed right?
.... the map is fixed already.
ah sry yes i watched tv so i hmm forget it
diescha, 1) be patient ; 2) Use that shiny Edit button next time
or the nice new axethrow animation
ah öh where u can dl the fixed?
ah k thx darky @first question
:) Yay this spell owns.
darky öhm the export is a bit 2 much for me can u explane it or can u made it for me pls? 8)
The 1 axe turn around 1-2 more rounds bug is fixed.
Now it also has the correct hotkey and axey got a damn nice new axethrow animation, made by alfred_sotn
found a bug i dont know why but thats the story:

i used the boomergang skill then 1 bumerang was normal and 1 was moving around me all the time i played pls fix!

but great 5/5

n1 darky
Nice job. Theres a few things though, but this is only a test map, so it REALLY doesn't matter. The hotkey is W instead of B. And if you click on an enemy spell immune unit, the spell won't fire, however, the axes still deal damage to it. It being the golem. Other than that, its a BEAUTIFUL spell. Really nice. Now... why don't you see if you can rig me up one that does that for each regular attack. Heh, wouldn't that be nice. 5/5
YES! Finally!!! A boomerang!!! I wuv you darky!
Aww... Darky28 didn't use my axe. :(
I found something strange..Sometimes when you throw it,1 of the axe dont come back she just turn around and nowhere and rotating on herself its happen 5% if the times
This is great, and what's that tree thing, you mean it can cut trees?
Cool spell, only he needs a better animation for throwing them, and when the axe hits an enemy, I'm not too fond of the cloud of smoke. Blood, or even the disenchant sfx look good for collisions like that. As for the animation, either the spell throw would look better, or creating an entirely new animtion where he swings down with both axes, since he is a custom model after all. Good work, 5/5.
Now if someone made a model for Zul'Jin (Axethrower Troll hero)... this could come in handy in my map :D

Awesome work.
hehe i liked the sketch you did, it make the spell looks realistic GJ
and mad_panda is right, we dont got much tree effecting spells
Good work Darky! We don't have enough tree-effecting spells.