- Joined
- Sep 26, 2009
- Messages
- 441
I wanna use code to make the casting unit get 500 health can someone please help me? this is what I converted except last incomplete line which I tried to do
EDIT:forgot to put I want it for 20 seconds only
EDIT:forgot to put I want it for 20 seconds only
function Trig_jass_attempt_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01F' ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A01F', GetSpellAbilityUnit()) == 1 ) ) then
return false
endif
return true
then (take(CastingUnit(+500
endfunction
function Trig_jass_attempt_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_jass_attempt takes nothing returns nothing
set gg_trg_jass_attempt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_jass_attempt, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_jass_attempt, Condition( function Trig_jass_attempt_Conditions ) )
call TriggerAddAction( gg_trg_jass_attempt, function Trig_jass_attempt_Actions )
endfunction
if ( not ( GetSpellAbilityId() == 'A01F' ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A01F', GetSpellAbilityUnit()) == 1 ) ) then
return false
endif
return true
then (take(CastingUnit(+500
endfunction
function Trig_jass_attempt_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_jass_attempt takes nothing returns nothing
set gg_trg_jass_attempt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_jass_attempt, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_jass_attempt, Condition( function Trig_jass_attempt_Conditions ) )
call TriggerAddAction( gg_trg_jass_attempt, function Trig_jass_attempt_Actions )
endfunction