HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to edit JASS Spells tutorial?

12-29-2006, 01:01 AM#1
Don0ndrew
Does any1 know a how to edit JASS spells tutorial? cuz im trying to use a spell on my map, but i dont really know how to change it up so the variables will work.
12-29-2006, 01:59 AM#2
Pyrogasm
How much JASS do you understand? That would be a good thing to know in order to help you... If all you're doing is replacing variable names, just do a search for whatever the name is in the original trigger, and change all references of it to be your variable.

On a side note, you'd better be giving credit to whomever made the spell you're copying, because the guys here at WC3Campaigns.net tend to tell people that a lot.
12-29-2006, 03:50 AM#3
illidan92
Post the trigger here and tell us what you want.

Edit: Pst teh trgr hre n tll us wat u want...:D
12-29-2006, 04:04 AM#4
Don0ndrew
Its a great spell by Vexorian and of course ill give credit, i never steal credit =]]

Collapse JASS:
function InitTrig_Stone_of_Ligthning takes nothing returns nothing
    call OnAbilityEffect('A017',"Stone_of_Ligthning_Actions")
endfunction

//===========================================================================
function Stone_of_Ligthning_Actions takes nothing returns nothing
 local unit     u   = GetTriggerUnit()
 local location loc = GetUnitLoc(u) 
 local location tar = GetSpellTargetLoc ()
 local location pol
 local integer  i
 local integer  dopt


    call SetUnitAnimation( u, "attack" )




    // I wanted a bigger energy ball for the first one, so I needed to increase the scale, and to use function ProjectileLaunchEx
    // notice I use 1.5 for scale argument.
    //
    call ProjectileLaunchExLoc( GetOwningPlayer(u) , "Abilities\\Spells\\Orc\\LightningBolt\\LightningBoltMissile.mdl", 1.5, 255, 255, 255, 255, 522, 0.15, loc, 0, tar, 200.0 )


    set dopt=DamageTypes(ATTACK_TYPE_CHAOS,DAMAGE_TYPE_LIGHTNING)
    // The damage will be chaos (ignore armor) and lightning (magical)

    set i = 1
    loop
        exitwhen i > 10

        set pol = PolarProjectionBJ(tar, i*25.0 , GetRandomInt(1, 360)) //distance: i*25, angle: random


        //: function DamagingProjectileLaunchAOELoc takes
        //:     unit hurter,
        //:     string modelpath,
        //:     real speed,
        //:     real arc,
        //:     location loc1,
        //:     real z1,
        //:     location loc2,
        //:     real z2,
        //:     real aoeradius,
        //:     real damage,
        //:     boolean affectallied,
        //:     integer DamageOptions
        //:     returns unit

        call DamagingProjectileLaunchAOELoc( u, "Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl", 100.0 , 0.35, tar, 275.0 , pol, 50, 100,50 ,true, dopt)
        call RemoveLocation(pol)
        set i = i + 1
    endloop
 call RemoveLocation(tar)
 call RemoveLocation(loc)
 set tar=null
 set loc=null
 set u=null
 set pol=null
endfunction