Thread: Disintegrate
View Single Post
Old 09-12-2009, 06:08 PM   #17
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

I think you would have to modify the part in which it reads x,y and then make the swap work on the first thing it finds. Or something like that.

I'll try the bug in game and see what's going on.
edit: yep, that's messed up.

edit:
there is a lame bug in the code, this fixes it:
Collapse JASS:
    private function onSpellEffect takes nothing returns nothing
     local unit u=GetTriggerUnit()
     local integer l= GetUnitAbilityLevel(u,SPELL_ID)
     local unit tar=GetSpellTargetUnit()
     local real dx=GetUnitX(tar)-GetUnitX(u)
     local real dy=GetUnitY(tar)-GetUnitY(u)
     local real dist = SquareRoot(dx*dx+dy*dy)

     local missile m

        call PolledWait(START_DELAY)
        set m = missile.create(GetUnitX(u), GetUnitY(u), Atan2(dy,dx) )

        set m.fxpath=GetAbilityEffectById(SPELL_ID, EFFECT_TYPE_MISSILE, 0)
        set m.z = 75.0
        set m.speed = missileSpeed(l)
        set m.level = l
        set m.collisionSize = missileCollision(l)
        set m.expirationTime = (dist+extraLength(l) ) / m.speed
        set m.source = u
        set m.target = tar


     set u=null
     set tar=null
    endfunction
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote