- Joined
- Aug 3, 2004
- Messages
- 2,891
How could I create variation of Blizzard that slows movement speed and a variation of Death and Decay that raises skeletons from units that die in it?
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)
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..
well it depends on his preferences, not yours ^^who cares
tornado affects magic immune units, too
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.this is not a solution
sorry but i'm not interested in debate about GUI n JASS etc as its matter of personal taste,it's like
"how do I get to new york with my bike?"
"use a car!"
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.
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
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.