• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Slowing Blizzard and Raise Dead Death and Decay

Status
Not open for further replies.
Pick every unit in the AoE of Blizzard, create a dummy at the position of picked unit and order it to Human Sorceress - Slow Picked unit.

For Death and decay, you need a custom one. Add the channeling unit into a unit group, when it begins the channeling. Then, check when a unit dies. If the Killing unit is in the DeathandDecay unit group, then create 1 skeleton at the position of the triggering unit and remove triggering unit from the game. A periodic event will fire when the caster begins channeling to damage enemies in the area of effect.
 
  • Like
Reactions: Kam
Blizzard is proving difficult. I need it to slow units in the initial wave and any unit who enters the spell while it is channeling. I did so by using 3 triggers and it currently has no effect:

  • Bitter Blizzard A
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Bitter Blizzard
    • Actions
      • Unit Group - Add (Triggering unit) to BlizzardUnits
  • Bitter Blizzard B
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) is in BlizzardUnits) Equal to True
    • Actions
      • Set TempLoc142 = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at TempLoc142 facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Slow (Blizzard New) to (Last created unit)
      • Unit - Order (Last created unit) to Human Sorceress - Slow (Triggering unit)
      • Custom script: call RemoveLocation (udg_TempLoc142)
  • Bitter Blizzard C
    • Events
      • Unit - A unit Stops casting an ability
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Bitter Blizzard
    • Actions
      • Unit Group - Remove (Triggering unit) from BlizzardUnits
 
Level 9
Joined
Dec 12, 2007
Messages
489
Blizzard is proving difficult. I need it to slow units in the initial wave and any unit who enters the spell while it is channeling. I did so by using 3 triggers and it currently has no effect:

  • Bitter Blizzard B
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) is in BlizzardUnits) Equal to True
    • Actions
      • Set TempLoc142 = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Attacking unit)) at TempLoc142 facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Slow (Blizzard New) to (Last created unit)
      • Unit - Order (Last created unit) to Human Sorceress - Slow (Triggering unit)
      • Custom script: call RemoveLocation (udg_TempLoc142)

well, your hero is channeling an ability, so you can't use the event "a unit is attacked" as that event only activated when a unit is ATTACKED, not DAMAGED, mind the difference.

so you need to use periodic event while your hero is channeling,
and in each period you enum all units in the area of effect, then cast slow on them via dummy.
and after the channeling ends, you turn off the periodic event.
 
Level 12
Joined
Oct 10, 2009
Messages
438
Assuming that you want PUI: (GUI requries hashtables; Cant type these yet)


Always on:

  • Bitter Blizzard A
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Bitter Blizzard
    • Actions
      • set AbilityAOE = 300
      • set Point[(Player number(Owner of (triggering unit))] = Target point of abillity being cast
      • Unit Group - Add (triggering unit) to BBCasters
      • set Group = Unit within (AbilityAOE) of Point[(Player number(Owner of (triggering unit))] ]
      • Unit Group - Pick all units in Group and do actions:
        • Add picked unit to group (BBslow)
      • Trigger - Turn on (BBLoop)
      • Trigger - Turn on (BBCasterLoop)
Conditional on:

  • BBLoop
    • Events
      • Time - Every 0.5 seconds of game time
    • Conditions
    • Actions
      • Set - BBslowon == False
      • Unit Group - Pick all units in BBslow and do actions:
        • Set Point[0] = Position of (Picked unit)
        • Unit - create Dummy (Slow) at Point[0]
        • Unit - Add a 1.9 seconds expiration timer
        • Unit - Add ability (Slow) to last created unit
        • Unit - Order last created unit to (Human sorceress - slow) picked unit
        • Set - BBslowon == True
    • If
      • BBslowon == False
      • Then
        • Trigger - Turn off this trigger
      • Else

Slow check:

  • BBCasterLoop
    • Events
      • Time - Every 0.5 seconds of game time
    • Conditions
    • Actions
      • Set - BBslowCasteron == False
      • Unit Group - Pick all units in BBCasters and do actions:
        • Set - BBslowCasteron == True
        • Set Group = Unit within (AbilityAOE) of Point[(Player number(Owner of (triggering unit))] ]
        • Unit Group - Pick all units in Group and do actions:
          • Add picked unit to group (BBslow)
    • If
      • BBslowCasteron == False
      • Then
        • Trigger - Turn off this trigger
      • Else
Turn off:

  • BBCasterOff
    • Events
      • Unit - A unit finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Bitter Blizzard
    • Actions
      • Unit Group - Remove (triggering unit) to BBCasters
Note: These triggers leak hell'alot, If you want them leakless, I'm afraid you will have to clean it yourself.
 
Last edited:
Level 3
Joined
Apr 4, 2006
Messages
33
there's an easier way but it won't make you happier.
just create (at target point of ability being cast) a tauren-chieftain and learn him endurance-aura with negative movement effect.
hide TC via trigger.
don't forget to remove TC when ability stops.
positive: nearly no triggers, no leaks
negative: it's an aura and units keep the aura for few seconds after they've left the ability being cast-point.

hope you understand my english :)
 
Level 9
Joined
Dec 12, 2007
Messages
489
there's an easier way but it won't make you happier.
just create (at target point of ability being cast) a tauren-chieftain and learn him endurance-aura with negative movement effect.
hide TC via trigger.
don't forget to remove TC when ability stops.
positive: nearly no triggers, no leaks
negative: it's an aura and units keep the aura for few seconds after they've left the ability being cast-point.

hope you understand my english :)

yes that's a good solution, but another drawback is that since it's an aura, it would be a bit difficult with magic-immune unit, as aura will still affect them even though the damage is not received.

another solution, not a better one, is to use JASS/vJASS instead of GUI, it will ease the difficulty by a lot..
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
yes that's a good solution, but another drawback is that since it's an aura, it would be a bit difficult with magic-immune unit, as aura will still affect them even though the damage is not received.

who cares
tornado affects magic immune units, too

another solution, not a better one, is to use JASS/vJASS instead of GUI, it will ease the difficulty by a lot..

this is not a solution

it's like
"how do I get to new york with my bike?"
"use a car!"
 
Level 9
Joined
Dec 12, 2007
Messages
489
who cares
tornado affects magic immune units, too
well it depends on his preferences, not yours ^^

this is not a solution
yes it is a header of a solution, because he wants it to be castable by normal units too, meaning it requires to be MUI, that is easier to achieve using local instances in JASS/VJASS.

it's like
"how do I get to new york with my bike?"
"use a car!"
sorry but i'm not interested in debate about GUI n JASS etc as its matter of personal taste,
if you can give him a better solution, then please do so.
 
Last edited:
Level 19
Joined
Feb 4, 2009
Messages
1,313
yes it is a header of a solution, because he wants it to be castable by normal units too, meaning it requires to be MUI, that is easier to achieve using local instances in JASS/VJASS.

learn jass! I know you already know gui but if you knew jass it would be easier!

do you really think he would have an easier time learning jass AND making the spell than just learing how to make the spell?
 
Level 9
Joined
Dec 12, 2007
Messages
489
it depends on his preference too... moving from GUI to JASS/VJASS is never an easy way, but the reward outnumbered the cost.^^
ehm well, i managed to create the "Slowing Blizzard" using JASS, and for you, i've prepared a setup configuration in GUI.

ow n btw, i use the dummy unit from the xe.

  • Slowing Blizzard Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- This is the main ability --------
      • Set SB_ABILID = Blizzard
      • -------- -------------------------------------------------- --------
      • -------- This is the main ability orderstring --------
      • Set SB_ORDER = blizzard
      • -------- -------------------------------------------------- --------
      • -------- This is the dummy slow ability --------
      • Set SB_DUMMYID = Slow
      • -------- -------------------------------------------------- --------
      • -------- This is the dummy slow orderstring --------
      • Set SB_DUMMYORDER = slow
      • -------- -------------------------------------------------- --------
      • -------- This is the interval of checking the enemy hitted, based on the spell interval --------
      • Set SB_INTERVAL = 1.00
      • -------- -------------------------------------------------- --------
      • -------- This is the dummy unit who will cast the dummy slow ability --------
      • Set SB_DUMMYUNIT = xe unit (Caster System?)
      • -------- -------------------------------------------------- --------
      • -------- This is the hashtable used for this spell --------
      • Hashtable - Create a hashtable
      • Set SB_TABLE = (Last created hashtable)
      • -------- -------------------------------------------------- --------
      • -------- This is the area of effect of the spell --------
      • Unit - Order (Last created unit) to Attack (Last created unit)
      • Set SB_AOE[1] = 200.00
      • Set SB_AOE[2] = 300.00
      • Set SB_AOE[3] = 400.00
      • -------- -------------------------------------------------- --------
JASS:
function Trig_Slowing_Blizzard_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == udg_SB_ABILID
endfunction

function Trig_Slowing_Blizzard_Effect takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local integer id = GetHandleId(t)
    local player p = LoadPlayerHandle(udg_SB_TABLE,id,0)
    local group g = LoadGroupHandle(udg_SB_TABLE,id,1)
    local real x  = LoadReal(udg_SB_TABLE,id,2)
    local real y  = LoadReal(udg_SB_TABLE,id,3)
    local integer lv  = LoadInteger(udg_SB_TABLE,id,5)
    local unit d
    local unit v

    call GroupEnumUnitsInRange(g,x,y,LoadReal(udg_SB_TABLE,id,4),null)
    loop
        set v = FirstOfGroup(g)
        exitwhen v == null
        call GroupRemoveUnit(g,v)
        if IsUnitEnemy(v,p) and GetWidgetLife(v) > .405 and not IsUnitType(v,UNIT_TYPE_MAGIC_IMMUNE) then
            set d = CreateUnit(p,udg_SB_DUMMYUNIT,x,y,0)
            call UnitAddAbility(d,udg_SB_DUMMYID)
            call SetUnitAbilityLevel(d,udg_SB_DUMMYID,lv)
            call IssueTargetOrder(d,udg_SB_DUMMYORDER,v)
            call UnitApplyTimedLife(d,'BTLF',1)
        endif
    endloop
    call GroupClear(g)
    
    set d = LoadUnitHandle(udg_SB_TABLE,id,6)
    if GetUnitCurrentOrder(d) != OrderId(udg_SB_ORDER) then
        call PauseTimer(t)
        call DestroyGroup(g)
        call FlushChildHashtable( udg_SB_TABLE, id )
        call DestroyTimer(t)
    endif
    
    set g = null
    set t = null
    set d = null
    set v = null
endfunction

function Trig_Slowing_Blizzard_Actions takes nothing returns nothing
    local unit u     = GetTriggerUnit()
    local player p   = GetOwningPlayer(u)
    local timer t    = CreateTimer()
    local integer lv = GetUnitAbilityLevel(u,udg_SB_ABILID)
    local real x     = GetSpellTargetX()
    local real y     = GetSpellTargetY()
    local integer id = GetHandleId(t)

    call SavePlayerHandle(udg_SB_TABLE,id,0,p)
    call SaveGroupHandle(udg_SB_TABLE,id,1,CreateGroup())
    call SaveReal(udg_SB_TABLE,id,2,x)
    call SaveReal(udg_SB_TABLE,id,3,y)
    call SaveReal(udg_SB_TABLE,id,4,udg_SB_AOE[lv])
    call SaveInteger(udg_SB_TABLE,id,5,lv)
    call SaveUnitHandle(udg_SB_TABLE,id,6,u)
    call TimerStart(t,udg_SB_INTERVAL,true,function Trig_Slowing_Blizzard_Effect)

    set p = null
    set u = null
    set t = null
endfunction

//===========================================================================
function InitTrig_Slowing_Blizzard takes nothing returns nothing
    set gg_trg_Slowing_Blizzard = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Slowing_Blizzard, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Slowing_Blizzard, Condition( function Trig_Slowing_Blizzard_Conditions ) )
    call TriggerAddAction( gg_trg_Slowing_Blizzard, function Trig_Slowing_Blizzard_Actions )
endfunction

please tell me if you notice bad things or things that needs to be fixed.
 

Attachments

  • slowingblizzard.w3x
    34.3 KB · Views: 56
Last edited:
  • Like
Reactions: Kam

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,204
For the death and decay, create dummies which will autocast raise skelton at the point it is cast.
For the blizzard which slows, create a dummy unit with an aura such as the tornado slow and place it in the middle of the blizzard. If you want magic immunity to affect it then you will need to use the slow cast idea. You could also use the natural slow of frostnova to make the ability by casting frostnova on a enemy dummy unit in the middle of the blizzard but this would only affect units caught in it at the start.
 
it depends on his preference too... moving from GUI to JASS/VJASS is never an easy way, but the reward outnumbered the cost.^^
ehm well, i managed to create the "Slowing Blizzard" using JASS, and for you, i've prepared a setup configuration in GUI.

ow n btw, i use the dummy unit from the xe.

  • Slowing Blizzard Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- This is the main ability --------
      • Set SB_ABILID = Blizzard
      • -------- -------------------------------------------------- --------
      • -------- This is the main ability orderstring --------
      • Set SB_ORDER = blizzard
      • -------- -------------------------------------------------- --------
      • -------- This is the dummy slow ability --------
      • Set SB_DUMMYID = Slow
      • -------- -------------------------------------------------- --------
      • -------- This is the dummy slow orderstring --------
      • Set SB_DUMMYORDER = slow
      • -------- -------------------------------------------------- --------
      • -------- This is the interval of checking the enemy hitted, based on the spell interval --------
      • Set SB_INTERVAL = 1.00
      • -------- -------------------------------------------------- --------
      • -------- This is the dummy unit who will cast the dummy slow ability --------
      • Set SB_DUMMYUNIT = xe unit (Caster System?)
      • -------- -------------------------------------------------- --------
      • -------- This is the hashtable used for this spell --------
      • Hashtable - Create a hashtable
      • Set SB_TABLE = (Last created hashtable)
      • -------- -------------------------------------------------- --------
      • -------- This is the area of effect of the spell --------
      • Unit - Order (Last created unit) to Attack (Last created unit)
      • Set SB_AOE[1] = 200.00
      • Set SB_AOE[2] = 300.00
      • Set SB_AOE[3] = 400.00
      • -------- -------------------------------------------------- --------
JASS:
function Trig_Slowing_Blizzard_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == udg_SB_ABILID
endfunction

function Trig_Slowing_Blizzard_Effect takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local integer id = GetHandleId(t)
    local player p = LoadPlayerHandle(udg_SB_TABLE,id,0)
    local group g = LoadGroupHandle(udg_SB_TABLE,id,1)
    local real x  = LoadReal(udg_SB_TABLE,id,2)
    local real y  = LoadReal(udg_SB_TABLE,id,3)
    local integer lv  = LoadInteger(udg_SB_TABLE,id,5)
    local unit d
    local unit v

    call GroupEnumUnitsInRange(g,x,y,LoadReal(udg_SB_TABLE,id,4),null)
    loop
        set v = FirstOfGroup(g)
        exitwhen v == null
        call GroupRemoveUnit(g,v)
        if IsUnitEnemy(v,p) and GetWidgetLife(v) > .405 and not IsUnitType(v,UNIT_TYPE_MAGIC_IMMUNE) then
            set d = CreateUnit(p,udg_SB_DUMMYUNIT,x,y,0)
            call UnitAddAbility(d,udg_SB_DUMMYID)
            call SetUnitAbilityLevel(d,udg_SB_DUMMYID,lv)
            call IssueTargetOrder(d,udg_SB_DUMMYORDER,v)
            call UnitApplyTimedLife(d,'BTLF',1)
        endif
    endloop
    call GroupClear(g)
    
    set d = LoadUnitHandle(udg_SB_TABLE,id,6)
    if GetUnitCurrentOrder(d) != OrderId(udg_SB_ORDER) then
        call PauseTimer(t)
        call DestroyGroup(g)
        call FlushChildHashtable( udg_SB_TABLE, id )
        call DestroyTimer(t)
    endif
    
    set g = null
    set t = null
    set d = null
    set v = null
endfunction

function Trig_Slowing_Blizzard_Actions takes nothing returns nothing
    local unit u     = GetTriggerUnit()
    local player p   = GetOwningPlayer(u)
    local timer t    = CreateTimer()
    local integer lv = GetUnitAbilityLevel(u,udg_SB_ABILID)
    local real x     = GetSpellTargetX()
    local real y     = GetSpellTargetY()
    local integer id = GetHandleId(t)

    call SavePlayerHandle(udg_SB_TABLE,id,0,p)
    call SaveGroupHandle(udg_SB_TABLE,id,1,CreateGroup())
    call SaveReal(udg_SB_TABLE,id,2,x)
    call SaveReal(udg_SB_TABLE,id,3,y)
    call SaveReal(udg_SB_TABLE,id,4,udg_SB_AOE[lv])
    call SaveInteger(udg_SB_TABLE,id,5,lv)
    call SaveUnitHandle(udg_SB_TABLE,id,6,u)
    call TimerStart(t,udg_SB_INTERVAL,true,function Trig_Slowing_Blizzard_Effect)

    set p = null
    set u = null
    set t = null
endfunction

//===========================================================================
function InitTrig_Slowing_Blizzard takes nothing returns nothing
    set gg_trg_Slowing_Blizzard = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Slowing_Blizzard, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Slowing_Blizzard, Condition( function Trig_Slowing_Blizzard_Conditions ) )
    call TriggerAddAction( gg_trg_Slowing_Blizzard, function Trig_Slowing_Blizzard_Actions )
endfunction

please tell me if you notice bad things or things that needs to be fixed.

I appreciate the response and help. The only changes I made were to remove the debug messages and add mechanical to the exception list.
 

Deleted member 177737

D

Deleted member 177737

Set the dummy to a variable and then kill it when the trigger finishes. (This might work, I think.)
 
Status
Not open for further replies.
Top