HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

About this trig..

08-31-2003, 04:15 AM#1
Thunder-Hunter
First, does this belong in the jass forum?

Ok, So I have a spell problem... I have made a trigger that when unit X casts curse unit Y casts hex that unit. I have made the spell in GUI then convert to jass to get the spell ID. All I did was do it in GUI, then convert to Jass and changed some spell ids..

function Trig_True_Critter_Power_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ACcs' ) ) then
return false
endif
return true
endfunction

function Trig_True_Critter_Power_Actions takes nothing returns nothing
call IssueTargetOrderBJ( gg_unit_ushd_0018, "AOhx", GetEventTargetUnit() )
endfunction

//===========================================================================
function InitTrig_True_Critter_Power takes nothing returns nothing
set gg_trg_True_Critter_Power = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_True_Critter_Power, GetOwningPlayer(gg_unit_hmpr_0004), EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_True_Critter_Power, Condition( function Trig_True_Critter_Power_Conditions ) )
call TriggerAddAction( gg_trg_True_Critter_Power, function Trig_True_Critter_Power_Actions )
endfunction