• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help with 2 triggers

Status
Not open for further replies.
Level 1
Joined
Sep 3, 2009
Messages
1
Someone help me!!! What this 2 triggers do?

function Trig_Item_Func003001 takes nothing returns boolean
return ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true )
endfunction

function Trig_Item_Func003002 takes nothing returns boolean
return ( IsPlayerAlly(GetOwningPlayer(GetTriggerUnit()), Player(0)) == true )
endfunction

function Trig_Item_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Item_Func003001(), Trig_Item_Func003002() ) ) then
return false
endif
return true
endfunction

function Trig_Item_Actions takes nothing returns nothing
call UnitAddItemByIdSwapped( 'I02J', GetTriggerUnit() )
call UnitAddItemByIdSwapped( 'ankh', GetTriggerUnit() )
endfunction

//===========================================================================
function InitTrig_Item takes nothing returns nothing
set gg_trg_Item = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Item, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Item, Condition( function Trig_Item_Conditions ) )
call TriggerAddAction( gg_trg_Item, function Trig_Item_Actions )
endfunction

and the second one

function Trig_ThreeKey2_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 6.00, "TRIGSTR_497" )
call TriggerSleepAction( 3.00 )
call AddSpecialEffectLocBJ( GetUnitLoc(GetTriggerUnit()), "Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl" )
call TriggerSleepAction( 1.00 )
call PlaySoundOnUnitBJ( gg_snd_ReviveNightElf, 100, GetTriggerUnit() )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnteringUnit(), 'I01Z') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnteringUnit(), 'I023') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnteringUnit(), 'I020') )
call UnitAddItemByIdSwapped( 'I02E', GetTriggerUnit() )
endfunction

//===========================================================================
function InitTrig_ThreeKey2 takes nothing returns nothing
set gg_trg_ThreeKey2 = CreateTrigger( )
call DisableTrigger( gg_trg_ThreeKey2 )
call TriggerAddAction( gg_trg_ThreeKey2, function Trig_ThreeKey2_Actions )

Please tell me where i had any mistake
Please someone help me
 
Status
Not open for further replies.
Top