HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Expected name

02-09-2006, 03:50 PM#1
pahl
I originally posted abou this in another forum. But i guess it's really a subject for this forum.
So Vexorian, i still don't understand what's wrong with this code, and i did everything in the readme.

function Trig_Slash_Func003001 takes nothing returns boolean
return ( udg_AM_Switch[2] == true )
endfunction

Code:
function ProjectileLaunchEx takes player owner, string modelpath, real scale, integer red, integer green, integer blue, integer alpha, real speed, real arc,real x1, real y1, real z1, real x2, real y2, real z2 returns nothing
 local unit m=AddCasterFacing( Atan2BJ(y2 - y1, x2 - x1) )
 local effect fx=null
    call SetUnitPosition( m, x1,y1)
    call SetUnitScale( m, scale, scale, scale)
    call SetUnitVertexColor(m, red, green, blue, alpha)

    call SetUnitFlyHeight( m, z1, 0)
    set fx= AddSpecialEffectTarget( modelpath, m,"origin" )
    call SetUnitOwner( m, owner, true)

    if (speed<=522) then
        call SetUnitMoveSpeed(m, speed)
        call UnitMoveToAsProjectile(m, arc, x2, y2, z2)
    else
        call UnitMoveToAsProjectileAnySpeed(m,speed,arc,x2,y2,null,z2)
    endif
    call DestroyEffect(fx)
    call ExplodeUnitBJ(m)
 set owner=null
 set fx=null
 set m=null
endfunction

function ProjectileLaunchExLoc takes player owner, string modelpath, real scale, integer red, integer green, integer blue, integer alpha, real speed, real arc, location loc1, real z1, location loc2, real z2 returns nothing
    call ProjectileLaunchEx( owner, modelpath, scale, red, green, blue, alpha, speed, arc,GetLocationX(loc1), GetLocationY(loc1), z1, GetLocationX(loc2), GetLocationY(loc2), z2)
endfunction

function ProjectileLaunchLoc takes string modelpath, real speed, real arc, location loc1, real z1, location loc2, real z2 returns nothing
    call ProjectileLaunchExLoc( Player(15), modelpath, 1,255,255,255,255,speed,arc,loc1,z1,loc2,z2)
endfunction

function Trig_Slash_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_473" )
    call TriggerExecute( gg_trg_Deufault_target_magic_switch )
    loop
        exitwhen ( Trig_Slash_Func003001() )
        call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 0.20))
    endloop
    set udg_AM_Switch[2] = false
    call ProjectileLaunchLoc("Abilities\\Spells\\Orc\\Shockwave\\ShockwaveMissile.mdl", 400, 0.15, GetUnitLoc(udg_AM_attacker), 0, GetUnitLoc(udg_AM_Target), 0 )
    call UnitDamageTargetBJ( udg_AM_attacker, udg_AM_Target, 640.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
    call SetUnitManaBJ( udg_AM_attacker, ( GetUnitStateSwap(UNIT_STATE_MANA, udg_AM_attacker) - 75.00 ) )
    call TriggerExecute( gg_trg_General_Attack )
endfunction

//===========================================================================
function InitTrig_Slash takes nothing returns nothing
    set gg_trg_Slash = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Slash, function Trig_Slash_Actions )
endfunction
02-09-2006, 04:33 PM#2
Vexorian
Remove these:

Collapse JASS:
function ProjectileLaunchEx takes player owner, string modelpath, real scale, integer red, integer green, integer blue, integer alpha, real speed, real arc,real x1, real y1, real z1, real x2, real y2, real z2 returns nothing
 local unit m=AddCasterFacing( Atan2BJ(y2 - y1, x2 - x1) )
 local effect fx=null
    call SetUnitPosition( m, x1,y1)
    call SetUnitScale( m, scale, scale, scale)
    call SetUnitVertexColor(m, red, green, blue, alpha)

    call SetUnitFlyHeight( m, z1, 0)
    set fx= AddSpecialEffectTarget( modelpath, m,"origin" )
    call SetUnitOwner( m, owner, true)

    if (speed<=522) then
        call SetUnitMoveSpeed(m, speed)
        call UnitMoveToAsProjectile(m, arc, x2, y2, z2)
    else
        call UnitMoveToAsProjectileAnySpeed(m,speed,arc,x2,y2,null,z2)
    endif
    call DestroyEffect(fx)
    call ExplodeUnitBJ(m)
 set owner=null
 set fx=null
 set m=null
endfunction

function ProjectileLaunchExLoc takes player owner, string modelpath, real scale, integer red, integer green, integer blue, integer alpha, real speed, real arc, location loc1, real z1, location loc2, real z2 returns nothing
    call ProjectileLaunchEx( owner, modelpath, scale, red, green, blue, alpha, speed, arc,GetLocationX(loc1), GetLocationY(loc1), z1, GetLocationX(loc2), GetLocationY(loc2), z2)
endfunction

function ProjectileLaunchLoc takes string modelpath, real speed, real arc, location loc1, real z1, location loc2, real z2 returns nothing
    call ProjectileLaunchExLoc( Player(15), modelpath, 1,255,255,255,255,speed,arc,loc1,z1,loc2,z2)
endfunction

They are already in the caster system