HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Frost Trap problems

06-30-2006, 12:47 AM#1
BuRnInSpartan
Hi guys i just made a quick spell i want it to be like the frost nova in WoW but i can't get it to work

Trigger:
Frost Nova
Collapse Events
Unit - A unit Begins channeling an ability
Collapse Conditions
(Ability being cast) Equal to Frost Nova
Collapse Actions
Collapse Unit Group - Pick every unit in (Units within 650.00 of (Position of (Casting unit)) matching ((Neutral Hostile controller) Equal to User)) and do (Actions)
Collapse Loop - Actions
Set Frozen_Unit = (Picked unit)
Unit Group - Add Frozen_Unit to Frozen
Unit - Set Frozen_Unit movement speed to 0.00
Special Effect - Create a special effect attached to the origin of Frozen_Unit using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
Set Frozen_SE = (Last created special effect)
Wait 15.00 seconds
Unit - Set Frozen_Unit movement speed to (Default movement speed of Frozen_Unit)
Special Effect - Destroy Frozen_SE
Unit - Remove Slow from Frozen_Unit
Unit Group - Remove Frozen_Unit from Frozen
06-30-2006, 12:53 AM#2
MercyfulJester
"(Matching (Neutral hostile controller) equal to User)"

That's just weird. Shouldn't it be something like (Owner of (Picked Unit) equal to (Neutral Hostile))?

Edit: and I think that once the 15 seconds has passed, only one of those units will be able to move.
06-30-2006, 01:06 AM#3
BuRnInSpartan
no for some reason all of the enemy units are marked with the special effect and if goes away after 15 seconds but i just can't get them to freeze.
06-30-2006, 01:18 AM#4
MercyfulJester
Then I'd guess the problem lies with the set movement speed to 0.00. You could try to set it to 0.01 or pause those units or something.
06-30-2006, 01:44 PM#5
BuRnInSpartan
yes pausing them would work i guess. thanks i'll give it a try
06-30-2006, 01:47 PM#6
Jacek
Stun'em with 0 dmg storm bolt
06-30-2006, 02:03 PM#7
BuRnInSpartan
yea pausing them didn't work either.. in order to stun them don't i need to make a dummy and have it cast storm bolt on them? + would this stun all of the units in that group?
06-30-2006, 02:18 PM#8
BuRnInSpartan
hmmm now it seems that my first cast of frost nova will pause them but if i go up to a new mob they don't get frozen
06-30-2006, 09:06 PM#9
Anopob
Crap, lag.
07-01-2006, 12:58 AM#10
BuRnInSpartan
#1 what are you talking about?
#2 if you are using my spell it's probably because you have a "crap" computer (128MB) because my old computer ran it fine with 256
07-01-2006, 01:27 AM#11
Anopob
If you're referring to me, uh...

Okay first of all I was going to say something, but then something happend to my connection or something and then it came out messed up. Also, I didn't see the like 5 above posters, so my post was pretty much pointless.
07-03-2006, 03:06 PM#12
BuRnInSpartan
<<bump>> i still need this complete any other ideas?
07-03-2006, 03:25 PM#13
Captain Griffen
Waits in loops are a bad idea.

You'll probably need JASS to make this MUI.
07-03-2006, 07:08 PM#14
BuRnInSpartan
hmm i'm not all that good with JASS
07-03-2006, 09:04 PM#15
Captain Griffen
Here are the actions you need (in jass):

Collapse JASS:
function H2I takes handle h returns integer
    return h
    return 0
endfunction

function I2U takes integer i returns unit
    return i
    return null
endfunction

function I2E takes integer i returns effect
    return i
    return null
endfunction

function I2T takes integer i returns timer
    return i
    return null
endfunction


function Frost_Nova_End takes nothing returns nothing
    local integer i = H2I(GetExpiredTimer())
    local unit u = I2U(GetStoredInteger(udg_gc, I2S(i), "unit"))
    call DestroyEffect(I2E(GetStoredInteger(udg_gc, I2S(i), "effect")))
    call SetUnitMoveSpeed(u, GetUnitDefaultMoveSpeed(u))
    call DestroyTimer(GetExpiredTimer())
    call FlushStoredMission(udg_gc, I2S(i))
    set u = null
endfunction

function Frost_Nova_Actions takes nothing returns nothing
    local group g = CreateGroup()
    local integer i
    local unit u = GetTriggerUnit()
    if udg_gc == null then
        call InitGameCache("jass.w3v")
    endif
    call GroupEnumUnitsInRange(g, GetUnitX(u), GetUnitY(u), 650, null)
    loop
        set u = FirstOfGroup(g)
        exitwhen u == null
        if //No idea what that condition you have is, but put it here (someone help// then
            set i = H2I(CreateTimer())
            call StoreInteger(udg_gc, I2S(i), "unit", H2I(u))
            call StoreInteger(udg_gc, I2S(i), "effect", H2I(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl", u, "origin")))
            call TimerStart(I2T(i), 15, false, function Frost_Nova_End)
            call SetUnitMoveSpeed(u, 0) // NB: This will only work if minimum speed under gameplay constants is 0, I think.
        endif
        call GroupRemoveUnit(g, u)
    endloop
    call DestroyGroup(g)
    set g = null
    set u = null
endfunction