WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > vJass Spells
User Name
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar

Thread Tools Search this Thread
Old 09-12-2009, 03:26 PM   #16
Purification's Avatar
Join Date: Jun 2008
Posts: 13

Purification has little to show at this moment (0)


Can anyone tell me how I could make swap a point target ability instead?

And i noticed that say if i use demon #1 and cast swap on demon #2 the missile flies towards demon #2 and swaps (which i guess is what is supposed to happen) and after that i use demon #2 and cast swap on demon #1, the swap occurs immediately and the missile flies out after the swap happens. why is that so ??
Purification is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 09-12-2009, 05:08 PM   #17
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


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.

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
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
Old 04-15-2010, 03:34 PM   #18
hell gate
Join Date: Sep 2009
Posts: 2

hell gate has little to show at this moment (0)


JNGP 5d doesn't show any errors but 1.24e can't start it :/
hell gate is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT. The time now is 11:55 PM.

The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2020, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services