• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help with spell

Status
Not open for further replies.
Level 9
Joined
Dec 12, 2007
Messages
489
if you use dummies for missiles then yes :)

yes, and probably not only that...
you will need to make the whole map to use dummy unit as projectile if you want it to affect too against all kinds of missile.
also you will have to check whether the projectile is in the slow area in each of the spell trigger...
so yes, it is possible, but very hard to achieve.
 
Level 9
Joined
Aug 21, 2008
Messages
533
sry for doulbepost but this is something new
ok now i have a weird bug:
JASS:
function Slowing takes nothing returns nothing
local unit u = GetEnumUnit()
local group g = CreateGroup()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
call GroupEnumUnitsInRange(g, x,y,350,null)
set u = null
set g = null
endfunction
This only picks units which dont have the locust ability.... but the missles have the locust ability...
After the missles die(cause the hit something) this suddenly begunns to work(till they get removed-they jsut they berfoe i remove them so there is a sound and a death anim)
 
Level 9
Joined
Aug 21, 2008
Messages
533
so what i may do now? pick all units at map wich have locust, remove locust, add units to group, pick all units which had locust and add locust????????????

JASS:
function LocustSux takes nothing returns nothing
    local unit u = GetEnumUnit()
    call UnitRemoveAbility(u,'Aloc')
    set u = null
endfunction

function LocustSuxNot takes nothing returns nothing
    local unit u = GetEnumUnit()
    call UnitAddAbility(u,'Aloc')
    set u = null
endfunction

function Slowing takes nothing returns nothing
    local unit u = GetEnumUnit()
    local group g = CreateGroup()
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)  
    call GroupEnumUnitsInRange(g, x,y,350,null)//Filter(function MissleFilter
    call ForGroup(g, function Slow )
    call DestroyGroup(g)
    set u = null
    set g = null
endfunction

function Trig_Slowing_Actions takes nothing returns nothing
        call ForGroup(udg_misslegroup,function LocustSux)
        call ForGroup(udg_Slowgroup, function Slowing )
        call ForGroup(udg_misslegroup,function LocustSuxNot)
endfunction


//===========================================================================
function InitTrig_Slowing takes nothing returns nothing
    set gg_trg_Slowing = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Slowing, 0.03 )
    call TriggerAddAction( gg_trg_Slowing, function Trig_Slowing_Actions )
endfunction

still does not work...
 
Last edited:
Status
Not open for further replies.
Top