master maste
New Member
- Reaction score
- 32
OK well I have this spell but its not MUI (actually got 8 spells based on the same thing (just different dummy units)
I've been looking at this code for days but my JASS skills have gone downhill in the last couple of months, so if anyone here could help me I would greatly appreciate it.
JASS:
function Trig_Ion_Shield_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A001039;
endfunction
function Trig_Ion takes nothing returns nothing
set udg_ShieldCasterLoc = GetUnitLoc(udg_ShieldCaster)
call SetUnitPositionLoc(udg_Dummy[1], udg_ShieldCasterLoc)
endfunction
function Trig_Ion_Shield_Actions takes nothing returns nothing
local timer t = CreateTimer()
set udg_ShieldCaster = GetSpellAbilityUnit()
set udg_ShieldCasterLoc = GetUnitLoc(udg_ShieldCaster)
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "|cffffcc00YOU HAVE ENABLED ION SHIELD|r." )
call RemoveUnit( GetLastCreatedUnit() )
call CreateNUnitsAtLoc( 1, 039;h001039;, GetTriggerPlayer(), udg_ShieldCasterLoc, GetUnitFacing(GetTriggerUnit()) )
set udg_Dummy[1] = GetLastCreatedUnit()
call TimerStart(t,0.03,true,function Trig_Ion)
endfunction
//===========================================================================
function InitTrig_Ion_Shield takes nothing returns nothing
set gg_trg_Ion_Shield = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ion_Shield, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Ion_Shield, Condition( function Trig_Ion_Shield_Conditions ) )
call TriggerAddAction( gg_trg_Ion_Shield, function Trig_Ion_Shield_Actions )
endfunction
I've been looking at this code for days but my JASS skills have gone downhill in the last couple of months, so if anyone here could help me I would greatly appreciate it.