I have this example spell I was making to get familiar with Jass but I'm not completely sure how to make it MUI. Any tips or tutorials? Example of the existing work.
The unshrink part is getting worked on. But anyone able to explain will help me greatly and learn a lot more.
JASS:
function Trig_Shrink_Ray_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function shrink takes nothing returns nothing
local real newsize = udg_targetsize - 5
local string mdl = "Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdl"
local effect sfx = AddSpecialEffect(mdl,GetUnitX(udg_target),GetUnitY(udg_target))
call SetUnitScalePercent( udg_target, newsize, newsize , newsize )
set udg_targetsize = newsize
endfunction
function startunshrink takes nothing returns nothing
call SetUnitScalePercent( udg_target, 100, 100, 100)
endfunction
function Trig_Shrink_Ray_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local timer t = CreateTimer()
local timer t2 = CreateTimer()
set udg_targetsize = 100
set udg_target = GetSpellTargetUnit()
call TriggerSleepAction(.50)
call TimerStart(t, .05, true, function shrink)
call TriggerSleepAction(.50)
call DestroyTimer(t)
//Unshrink
call TimerStart(t2,5,false,function startunshrink)
endfunction
//===========================================================================
function InitTrig_Shrink_Ray takes nothing returns nothing
set gg_trg_Shrink_Ray = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shrink_Ray, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Shrink_Ray, Condition( function Trig_Shrink_Ray_Conditions ) )
call TriggerAddAction( gg_trg_Shrink_Ray, function Trig_Shrink_Ray_Actions )
endfunction
The unshrink part is getting worked on. But anyone able to explain will help me greatly and learn a lot more.