Spell Meathook

Flare

Stops copies me!
Reaction score
662
My latest vJASS spell - Meathook
New name pending. If you have an idea, let me know

Read this before jumping to conclusions
Before you say something like "this isn't the same as DotA's meathook", please stop yourself. This is NOT meant to be an exact replica of DotA's meathook, just another version of it that suits my personal taste. If you wish, you can alter the values to make it more DotA-like (altering the constants should be sufficient to make it DotA-like)

And yes, I know there is already a JASS version of Meathook made by Tinki3, but his version uses [DEL]Handle Vars[/DEL] Timer Ticker, unlike this version which uses HAIL

BEWARE!
[del]Do NOT set your hook's range greater than MAXLINKS * DISTANCE. It will cause a bug which leaves the first hook link in existence, and I can't find how to fix it. My automatic range reduction feature doesn't seem to fix it...[/del]
Nevermind, I found a solution. If you exceed DISTANCE * MAXLINKS, the range will be reduce by (DISTANCE * 2)

Configurable options:
Maximum number of links to any hook chain (this is automatically rectified if you go above a certain distance)
Collision radius for the hook
Scaling value of the hook
Scaling value of the hook segments
Distance between caster and hook when initially spawned
Special effect used for impact
Whether the effect is displayed on allies
Special effect used for pullback
Damage
Range

Requirements:
Code:
-NewGen World Editor
-HAIL system
-Ability to read :P (everything that can/should be altered is given a fairly descriptive comment. If you can't understand them, let me know)

Importing instructions: (also located within map)
Code:
//Importing instructions\\
----------------------------------------

//Copy the HAIL trigger into your map

//Copy the Meathook trigger into your map

//Copy the Hook Dummy unit, Link Dummy unit and Meathook ability into your map
    *Copy the Hook (2) model from the Import Manager if you want the Abomination's hook.
    *Copy the Meathookchain model from the Import Manager if you want the cool chain link.

//Adjust the SPELLID, HOOKID and LINKID values in the global block.

//They MUST match the rawcodes shown in Object Editor (press Ctrl - D to view the rawcodes)

//Adjust the remainder of the constants to suit your needs

//Add the Meathook ability to a unit.

//Cast the ability, and enjoy.

----------------------------------------
//End of importing instructions\\

Updates:
Code:
v1: Initial release
v2: Fixed a bug with ALLYHITSFX. If set to true, it would damage allies instead of displaying the special effect
v3: In range trigger was set to deal flat damage instead of the intended damage. Fixed
v4: Reverted to v1 to fix that bug with first segment. v2 and v3 fixes are included in this
v5: Implemented scaling (forgot it before), changed the hook model to Spellbreaker projectile
v6: Fixed the automatic range reducer. Now, if you exceed the maximum range, the range is reduced sufficiently to remove the first link
v7: Uses SetUnitX/Y instead of SetUnitPosition. Changed the dragback effect. New hook model - Kodo Beast axe. Previous coordinates are stored in real arrays, so the hook doesn't travel behind caster if it goes beyond map boundaries ^^
v8: Replaced RemoveUnit with a combination of KillUnit and ShowUnit
v9: Replaced the use of a triggeraction with a triggercondition. Added new hook model (Abomination hook, thanks to Uberplayer/OneBadPsycho) and chain link model (taken from Abomination, thanks to Metal-Guard)

Screenshots:
Hooks flying - No targets
meathookagain1ov2.png

Spell code:
JASS:
//Meat Hook
//By Flare
//Constructed using vJASS and Strilanc's HAIL system
//Thanks to Strilanc for creating HAIL
//Thanks to DotA for the inspiration to make my own version of the spell
//Thanks to Trollvottel for pointing out that I never attached the struct to the In Range trigger.
//Thanks to Metal-Guard/Uberplayer for the awesome hook and chain link, and to OneBadPsycho for the skinning of both <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile    :)" loading="lazy" data-shortname=":)" />
//This spell would not have been possible without the above people/map

//REQUIRES NEWGEN WORLDEDITOR TO OPEN\\

//Importing instructions\\
//----------------------------------------\\
//Importing instructions are located in the trigger comment called &quot;Importing&quot;

    
scope Meathook
//Initializing HAIL
//Do -NOT-, under ANY circumstances, change the following line unless you know exactly what you are doing
    //! runtextmacro HAIL_CreateProperty(&quot;HookData&quot;, &quot;integer&quot;, &quot;&quot;)

//SetUnitXY function used for moving the hook
private function SetUnitXY takes unit u, real x, real y returns nothing
     if x&lt;GetRectMaxX(bj_mapInitialPlayableArea) and x&gt;GetRectMinX(bj_mapInitialPlayableArea) and y&lt;GetRectMaxY(bj_mapInitialPlayableArea) and y&gt;GetRectMinY(bj_mapInitialPlayableArea) then
       call SetUnitX(u,x)
       call SetUnitY(u,y)
     endif
endfunction

globals
    //This limits the number of links to the hook&#039;s chain.
//Setting it higher will limit the MUI capability (currently, 81 instances max)
//Setting it lower will potentially limit the maximum distance travelled
//^--Depends on how close the links will be spawned beside each other
    constant integer MAXLINKS = 100
    
    //Rawcodes\\
//Base ability (Meathook) rawcode
    private constant integer SPELLID = &#039;A000&#039;
//Hook dummy rawcode
    private constant integer HOOKID = &#039;h001&#039;
//Link dummy ID
    private constant integer LINKID = &#039;h000&#039;
    
    //Other constants\\
//Timer interval
    private constant real TIMERINTERVAL = 0.03
    
//Distance travelled per second by hook
    private constant real SPEED = 800
    
//Distance moved per timer interval
//Also used for distance between hook links
    private constant real DISTANCE = SPEED*TIMERINTERVAL
//DISTANCE * MAXLINKS = Maximum possible distance. Increase SPEED, TIMERINTERVAL (not highly advised) or MAXLINKS to increase the maximum possible range.
//Currently, maximum range is 2400 (100 * (800*0.03) = 100 * 24 = 2400)

//-180 degrees in radians
//This is used for hook retraction
    private constant real REVERSEANGLE = Deg2Rad (-180)
    
//Collision range
    private constant real COLLIDERANGE = 50
    
//Hook size scale
    private constant real HOOKSCALE = .75
    
//Link size scale
    private constant real LINKSCALE = .75
    
//How far in front of the hero the hook will form
    private constant real SPAWNOFFSET = 50
    
//Effect created on hook hit
//NOTE: Make sure you replace a single \ with \\ if you change this i.e.
//Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl --&gt; Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl
    private constant string FXSTRING = &quot;Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl&quot;
    
//Pullback effect
//Set this to &quot;&quot; to remove the effect created
    private constant string PULLFX = &quot;Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl&quot;
    
//Determines whether the above effect is created when an ally is hit
//By default, no SFX will be created when hitting an ally.
    private constant boolean ALLYHITSFX = false
endglobals


//Functions for customizable damage/range
//To have a constant damage dealt at all levels, change the &quot;return base + level*multiplier&quot; to &quot;return 100&quot; (for example)
//DONT INCLUDE QUOTE MARKS
private function Damage takes unit u returns real
    local real base = 0
    local real level = I2R (GetUnitAbilityLevel (u, SPELLID))
    local real multiplier = 100.
    return base + level*multiplier
endfunction

//To have a constant range dealt at all levels, change the &quot;return base + level*multiplier&quot; to &quot;return 1000&quot; (for example)
//DONT INCLUDE QUOTE MARKS
//NOTE:
//If hook range exceeds DISTANCE * MAXLINKS, it will be reduced by (DISTANCE * 2)
//Best thing to do is just not exceed the limit.
private function Range takes unit u returns real
    local real base = 200
    local real level = I2R (GetUnitAbilityLevel (u, SPELLID))
    local real multiplier = 200.
    return base + level*multiplier
endfunction


//DO NOT EDIT BELOW HERE
//--------------------------------------------------------------------------------\\

//Struct data for the hook
private struct Hookdata
    unit hookcaster //The unit who casts Meathook
    unit hooktarget //The target struck
    unit array hooklink[MAXLINKS] //The links/segments of the hook chain
    integer linkcounter = 0 //Used for creating/destroying the above units
    real hookangle //Angle at which the hook travels
    real currentdistance //Current distance travelled by the hook
    real maxdistance //Maximum distance travelled before the hook retracts
    real damage//The damage, obviously
    unit hook//The hook itself
    real array x[MAXLINKS]
    real array y[MAXLINKS]
    real targetangle //Used to keep the angle between hook and victim correct on retract
    real targetdistance //Same as above, except relates to distance instead of angle
    boolean retracton
    boolean hooked = false //When 0, nothing is hooked. When 1, something is hooked
    timer hooktimer //Timer used for extension/retraction
    trigger hittrig //Trigger used for detecting when a unit is hit
    triggeraction hitaction //Action set for hittrig
    method onDestroy takes nothing returns nothing //Cleaning up triggers/timers/HAIL
        call KillUnit (.hook)
        call ShowUnit (.hook, false)
        call KillUnit (.hooklink[0])
        call ShowUnit (.hooklink[0], false)
        set .retracton = false
        set .hooked = false
        call TriggerRemoveAction (.hittrig, .hitaction)
        call ResetHookData (.hooktimer)
        call DestroyTimer (.hooktimer)
        call ResetHookData (.hittrig)
        call DestroyTrigger (.hittrig)
    endmethod
endstruct

//Hit trigger\\
//Hit trigger conditions
private function HitCond takes nothing returns boolean
    local Hookdata a = GetHookData (GetTriggeringTrigger ())
    local unit u = GetTriggerUnit ()
    local real hx = GetUnitX (a.hook)
    local real hy = GetUnitY (a.hook)
    local real tx = GetUnitX (u)
    local real ty = GetUnitY (u)
    local real x = tx - hx
    local real y = ty - hy
        if GetWidgetLife (u) &gt;= 1. and IsUnitType (u, UNIT_TYPE_STRUCTURE) != true and IsUnitType (u, UNIT_TYPE_FLYING) != true and IsUnitType (u, UNIT_TYPE_ETHEREAL) != true and IsUnitType (u, UNIT_TYPE_MECHANICAL) != true then
            if a.hooked == false and u != a.hookcaster  then
                set a.hooktarget = u
                set a.hooked = true
                set a.retracton = true
                set a.targetangle = Atan2 (y, x)
                set a.targetdistance = SquareRoot ((x*x) + (y*y))
                    if IsUnitEnemy (u, GetOwningPlayer (a.hookcaster)) then
                        call DestroyEffect (AddSpecialEffect (FXSTRING, tx, ty))
                        call UnitDamageTarget (a.hookcaster, u, a.damage, true, true, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
                    else
                        if ALLYHITSFX == true then
                            call DestroyEffect (AddSpecialEffect (FXSTRING, tx, ty))
                        endif
                    endif
            endif
        endif
   
    set u = null
    return true
endfunction
 
private function TimerActions takes nothing returns nothing
    local timer t = GetExpiredTimer ()
    local Hookdata a = GetHookData (t)
    local real hx1 = GetUnitX (a.hook)
    local real hy1 = GetUnitY (a.hook)
    local real tx2
    local real ty2
    local real x
    local real y
    
    if a.retracton == false then
        set a.linkcounter = a.linkcounter + 1
        set a.hooklink[a.linkcounter] = CreateUnit (GetOwningPlayer (a.hookcaster), LINKID, hx1, hy1, Rad2Deg (a.hookangle))
        call SetUnitScale (a.hooklink[a.linkcounter], LINKSCALE, LINKSCALE, LINKSCALE)
        call SetUnitTimeScale (a.hooklink[a.linkcounter], 0)
        set a.x[a.linkcounter] = hx1 + Cos(a.hookangle)*DISTANCE
        set a.y[a.linkcounter] = hy1 + Sin (a.hookangle)*DISTANCE
        call SetUnitXY (a.hook, a.x[a.linkcounter], a.y[a.linkcounter])
    else
        call KillUnit (a.hooklink[a.linkcounter])
        call ShowUnit (a.hooklink[a.linkcounter], false)
        set a.linkcounter = a.linkcounter - 1
    endif
    
    call SetUnitXY (a.hook, a.x[a.linkcounter], a.y[a.linkcounter])
    
    if a.linkcounter == 0 and a.retracton == true then
        set a.currentdistance = 0
        call a.destroy ()
    endif
    
    
    if a.currentdistance &gt;= a.maxdistance then
        set a.retracton = true
    else
        set a.currentdistance = a.currentdistance + DISTANCE
    endif
    
    if a.hooked == true then
        set tx2 = a.x[a.linkcounter] + Cos (a.targetangle) * a.targetdistance
        set ty2 = a.y[a.linkcounter] + Sin (a.targetangle) * a.targetdistance
        call SetUnitXY (a.hooktarget, tx2, ty2)
        call DestroyEffect (AddSpecialEffect (PULLFX, tx2, ty2))
    endif
    
    set t = null
endfunction

private function MeathookCond takes nothing returns boolean
    return GetSpellAbilityId () == SPELLID
endfunction
    
private function MeathookActions takes nothing returns nothing
    local Hookdata a = Hookdata.create ()
    local location targetloc
    local real cx
    local real cy
    local real tx
    local real ty
    local real sx
    local real sy
    set a.hookcaster = GetTriggerUnit ()
    set a.linkcounter = 0
    if GetSpellTargetUnit () == null then
        set targetloc = GetSpellTargetLoc ()
        set tx = GetLocationX (targetloc)
        set ty = GetLocationY (targetloc)
        call RemoveLocation (targetloc)
    else
        set tx = GetUnitX (GetSpellTargetUnit ())
        set ty = GetUnitY (GetSpellTargetUnit ())
    endif
    set a.retracton = false
    set a.maxdistance = Range (a.hookcaster)
    if a.maxdistance &gt;= DISTANCE * MAXLINKS then
        set a.maxdistance = (DISTANCE * MAXLINKS) - 2*DISTANCE
    endif
    set a.damage = Damage (a.hookcaster)
    set cx = GetUnitX (a.hookcaster)
    set cy = GetUnitY (a.hookcaster)
    set a.hookangle = Atan2 (ty-cy, tx-cx)
    set sx = cx + Cos (a.hookangle)*SPAWNOFFSET
    set sy = cy + Sin (a.hookangle)*SPAWNOFFSET
    set a.hook = CreateUnit (GetOwningPlayer (a.hookcaster), HOOKID, sx, sy, Rad2Deg (a.hookangle))
    set a.x[a.linkcounter] = sx
    set a.y[a.linkcounter] = sy
    call SetUnitTimeScale (a.hook, 0)
    call SetUnitScale (a.hook, HOOKSCALE, HOOKSCALE, HOOKSCALE)
    set a.hooklink[a.linkcounter] = CreateUnit (GetOwningPlayer (a.hookcaster), LINKID, sx, sy, Rad2Deg (a.hookangle))
    call SetUnitScale (a.hooklink[a.linkcounter], LINKSCALE, LINKSCALE, LINKSCALE)
    call SetUnitTimeScale (a.hooklink[a.linkcounter], 0)
    set a.hooktimer = CreateTimer ()
    set a.hittrig = CreateTrigger ()
    call SetHookData (a.hooktimer, a)
    call TimerStart (a.hooktimer, TIMERINTERVAL, true, function TimerActions)
    call TriggerRegisterUnitInRange (a.hittrig, a.hook, COLLIDERANGE, null)
    call TriggerAddCondition (a.hittrig, Condition (function HitCond))
    call SetHookData (a.hittrig, a)
    //set a.hitaction = TriggerAddAction (a.hittrig, function HitActions)
    set targetloc = null
endfunction
    
public function InitTrig takes nothing returns nothing
    local trigger Meathook = CreateTrigger ()
    call TriggerRegisterAnyUnitEventBJ (Meathook, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition (Meathook, Condition (function MeathookCond))
    call TriggerAddAction (Meathook, function MeathookActions)
endfunction
endscope


Huge thanks to Trollvottel for pointing out that I never attached my struct to .hittrig :D Couldn't have got this working without your help.

Bugs/suggestions:
If I have left anything out (either in this post, or in the map) or you have found a problem with the spell, let me know.

Credits:
If you use this spell, please credit me for making it (since I did put alot of time and effort into making it). You should also credit Trollvottel (unless he/she says otherwise) since he/she pointed out my mistake, thus fixing the ability.
 

Attachments

  • Meathook v9.w3x
    39.7 KB · Views: 313

GoGo-Boy

You can change this now in User CP
Reaction score
40
Tested it shortly. Seems to be nice. However you should increase the fly height.
 

FroznYoghurt

New Member
Reaction score
37
Bugs/suggestions:
If I have left anything out (either in this post, or in the map) or you have found a problem with the spell, let me know.

Why call it meathook? Dosen't look very meaty to me, "grappling hook" would be more suitable imo.

Anyhow, looks good. :thup:
 

Flare

Stops copies me!
Reaction score
662
Good point ^^
I don't really like grappling hook (my idea of grappling hook would be to pull you to an object, not to pull the object to you :p)

Also: Have I got all the conditions required for hitting? Are 'not structure' and 'not flying' enough? And it is intended to hit magic immune units. I suppose I should add ethereal. Any others?

Update: See updates in first post for details​

EDIT: Does this leak?
JASS:
    call TriggerAddAction (a.hittrig, function HitActions)

Taken from this post
I've never had anyone point out that a trigger action leaked, and what Tinki said in the linked post makes me wonder :D
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
Actions can not be correctly cleaned up. Hence you must do all your stuff in conditions.
 

Flare

Stops copies me!
Reaction score
662
... I have to change around everything?

Hence you must do all your stuff in conditions.

Just tried doing that, and it didn't work at all. I was only able to hit one unit EVER (same thing happened when I forgot the attach the struct to the trigger).

Should I assign the HitActions function to a global?

[DEL]EDIT: Found a problem with the MUI-ness. If you cast multiple times, the first link only gets removed from the most recently ended instance, even though the onDestroy method specifically destroys hooklink[0].

Any ideas of what could be wrong?[/DEL]

Fixed the MUI problem (something was changed between v1 and v3 :p)
 

Kenny

Back for now.
Reaction score
202
Very nice spell. From first glance everything seems to be fine and the screenies look cool. Ill check it out in game soon.

Few suggestions though:

I'm not sure of your reasoning behind your Damage and Range functions, but i believe they could be simplified to something like this:

JASS:
private function Damage takes integer lvl returns real
    return 100.00+(lvl*100.00)
endfunction

and:
JASS:
private function Range takes integer lvl returns real
    return 200.00+(lvl*200.00)
endfunction


Then all thats needed is to make a struct member for GetUnitAbilityLevel() and refer to it as an arguement in those functions.

Also, this isn't really important at all, but deaths of units are registered at 0.405 i believe, so in your filter function you may wanna change that, but once again its not really necessary and wont change anything really, just a pet peeve of mine :D.
 

Flare

Stops copies me!
Reaction score
662
> I'm not sure of your reasoning behind your Damage and Range functions

I made it that way, because I thought it would be easier to configure. Perhaps people wouldn't like to use ability level in the damage/range calculation (or some other factor instead of it), and if that's the case, they can just set level to 1 AND since the functions take the caster, there are alot of possibilities for altering damage/range (based on stats, based on health/mana etc)

> Then all thats needed is to make a struct member for GetUnitAbilityLevel() and refer to it as an arguement in those functions

Why would I want a struct member for that? .damage is set in MeathookActions, and it won't change at anytime for that particular instance

> Also, this isn't really important at all, but deaths of units are registered at 0.405 i believe

Well, I had that in the in range filter, but the in range actions weren't working properly and I changed it to > 1 just incase, and forgot to change it back. It's not that big of a deal though?
 

Kenny

Back for now.
Reaction score
202
I made it that way, because I thought it would be easier to configure. Perhaps people wouldn't like to use ability level in the damage/range calculation (or some other factor instead of it), and if that's the case, they can just set level to 1 AND since the functions take the caster, there are alot of possibilities for altering damage/range (based on stats, based on health/mana etc)

Your functions are using ability level in their calculations anyway, the way i showed you is exactly like yours, except for the fact that you are using 3 local variables, which are some-what unneeded. In my opinion it does not add to configurability but makes it more confusing for those less knowledgable in JASS. Also having the caster in the equation may lead to more possibilities, but only those who are more knowledgable may understand how to use those possibilities. Simplicity and functionality is key in relation to configuring spells.

Why would I want a struct member for that? .damage is set in MeathookActions, and it won't change at anytime for that particular instance

Well then you can just make a local variable for it.

Well, I had that in the in range filter, but the in range actions weren't working properly and I changed it to > 1 just incase, and forgot to change it back. It's not that big of a deal though?

Its not a bit deal at all, in fact i highly doubt it will change anything, except for a 1 in a billion chance of getting a unit that is dying to get hooked at the exact right time, but thats far from the point. There is no real need to change in, as i stated, its just a pet peeve of mine :D.
 

Flare

Stops copies me!
Reaction score
662
> Your functions are using ability level in their calculations anyway, the way i showed you is exactly like yours, except for the fact that you are using 3 local variables, which are some-what un-needed. In my opinion it does not add to configurability but makes it more confusing for those less knowledgable in JASS.

1) I know they are using ability level in the calculations, but what if you wanted to use your hero's STR for the damage? Taking the ability level won't do much for you ^^

2) I know the 3 locals are somewhat unneeded, but I personally think it's simpler if everything is on 3 separate lines, and unless you can't understand a few words of English, there shouldn't be a major problem configuring it. If you see the words base, level and multiplier, what would you expect each of them to do?

3) Noone else has ever complained about my method of variable damage ^^ (I'm not saying that your opinion is wrong though)
 

Kenny

Back for now.
Reaction score
202
Im not saying that yours is wrong either :D

Its just, that in my experience with spells it has come to my attention that a lot of people use the "other" method in relation to Damage for an ability such as yours, and i have like 300+ spell maps from a lot of different sites, its the best way to learn :p.

But yeah, whatever you find easier/more efficient/better etc. is fine by me, it doesnt take away from the fact that this spell is awesome!

Also my above post was kinda edited to give a better explanation into the use of the castrer in these functions.

Anywho +rep for a great "remake" of a classic spell, its probably the best I've seen, out of the dozen i have lol.
 

Flare

Stops copies me!
Reaction score
662
> Simplicity and functionality is key in relation to configuring spells.

That's one of the big things for me. There's no point in making a spell for other people to use if they can't adjust it to their likings (I think the hook/link scaler shows that ^^ speaking of which, I must update again. I never actually added a SetUnitScale part ^^)

> Anywho +rep for a great "remake" of a classic spell, its probably the best I've seen, out of the dozen i have lol.

Thanks ^^ Best in what way? Is it slightly more original than the others, or just infinitely more awesome :D

Still looking for an alternative name for the spell

EDIT: Just found a pretty cool hook/link choice. Phoenix projectile (Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl) for the links and Black Dragon projectile (Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl) for the hook. Hook size: 1.5, link size: 0.75

UPDATE
See updates box for details
 

Kenny

Back for now.
Reaction score
202
Thanks ^^ Best in what way? Is it slightly more original than the others, or just infinitely more awesome :D

I'd have to say: "infinitely more awesome" lol

Na, honestly, i just think it is well laid out, globals and struct members and functions are well described, it is changed a bit from the original, its clean, works well and over all its quite easy to understand. So basically it is infinitely more awesome lol.

This should be approved in no time :D good work.

PS: im not saying that everyone else's is crap, for all those other hook makers out there.
 

emjlr3

Change can be a good thing
Reaction score
395
i cant say the fact that this uses HAIL aside from TT is a reason to submit this, or approve it

especially considering anything made with TT will be faster

***====***

getspelltargetloc works whether its the gound or a unit

should use a triggercondition for the trigger, then you dont have to remove it(which your not even doing)

no timer stack? or this could really run on just one....

removing units is bad

setunitx/y is much faster this setunitposition
 

Flare

Stops copies me!
Reaction score
662
i cant say the fact that this uses HAIL aside from TT is a reason to submit this, or approve it

especially considering anything made with TT will be faster

***====***

getspelltargetloc works whether its the gound or a unit

should use a triggercondition for the trigger, then you dont have to remove it(which your not even doing)

no timer stack? or this could really run on just one....

removing units is bad

setunitx/y is much faster this setunitposition

1) uhm... not really understanding you there, care to simplify? ^^

2) why use HAIL and TT when i can just use HAIL alone (i prefer using an In Range trigger to grab the unit, and TT cant attach to triggers, correct?)

3) it does?

4) tried that, failed, went back to actions.

5) oops, forgot to re-add the TriggerRemoveAction (removed it before for some reason)

6) timer stack? whats that? the spell works as intended, and i havent found any bugs that cant be fixed yet so...

7) ill change it to KillUnit then
EDIT: killing the hook links makes them explode... looks really ugly having lots of little yellow things appearing from the hook links

8) but cant SetUnitX/Y cause a crash if the unit leaves map boundaries?

and remember, i am relatively new to JASS so you cant expect it to be absolute perfection, can you?
 

soulreaping

New Member
Reaction score
17
TT is the fastest attachment system for short interval timers (<0.04 or something), and the fact is using 1 timer for all is just great.

Another thing, make your Damage and Range functions constant, it's slightly faster.

I see no reason why this should be approved, sorry.

There is already a great version of Meat Hook made by Tinki3.

EDIT:
8) but cant SetUnitX/Y cause a crash if the unit leaves map boundaries?

You should create/use Vexorian's functions to check Max and Min X/Y.

Coordinates = reals = no handles = faster.
 

Flare

Stops copies me!
Reaction score
662
TT is the fastest attachment system for short interval timers (<0.04 or something), and the fact is using 1 timer for all is just great.

Another thing, make your Damage and Range functions constant, it's slightly faster.

I see no reason why this should be approved, sorry.

There is already a great version of Meat Hook made by Tinki3.

EDIT:


You should create/use Vexorian's functions to check Max and Min X/Y.

Coordinates = reals = no handles = faster.

1) Fair enough about TT, but I don't really see how the use of only one timer is so great :S

2) Constants would make it harder to customize though, right? (since you can't set ability level/stats to a constant, for example <at least I don't think you can>)

3) Fair enough, but this isn't supposed to be an exact replica of DotA's Meathook (I believe Tinki3's version is?), but a remake with adjustments to suit my tastes :p

> Coordinates = reals = no handles = faster.
To my knowledge, I'm only using reals for movement (apart from GetSpellTargetLoc) unless SetUnitPosition is being sneakily evil and using a location of the given coordinates

EDIT: Just found vile's method of doing SetUnitX/Y :p
JASS:
function SetUnitXY takes unit u, real x, real y returns nothing
     if x&lt;GetRectMaxX(bj_mapInitialPlayableArea) and x&gt;GetRectMinX(bj_mapInitialPlayableArea) and y&lt;GetRectMaxY(bj_mapInitialPlayableArea) and y&gt;GetRectMinY(bj_mapInitialPlayableArea) then
       call SetUnitX(u,x)
       call SetUnitY(u,y)
     endif
endfunction


There shouldn't be any problems associated with doing that?

EDIT: unless there is a great alternative to RemoveUnit (which doesnt involve killing the unit), im gonna have to stick with RemoveUnit... I need to set the anim speed of my new projectile to 0% so it looks like a hook, rather than an axe.

removing units is bad
Just to clarify: Why is removing units bad? I thought it was only a problem if you did it while something was attached to a unit (which, in this case, it isn't)
 

Trollvottel

never aging title
Reaction score
262
My comment to your spell:

Looks nice, partly not so nice.
Partly means, the part when it grabs a unit and the hook head still turns after grabbing.
 

Flare

Stops copies me!
Reaction score
662
My comment to your spell:

Looks nice, partly not so nice.
Partly means, the part when it grabs a unit and the hook head still turns after grabbing.

I just gave a new hook model (Kodo Beast Rider's axe) and it is at 0% animation speed so it looks kind of like a cleaver.

UPDATE: See updates box for details

EDIT: Bah, TinyPic and ImageShack are being *beep*s for uploading the screenshots (correctly). Should have it fixed in a few minutes
 
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