Aue wrote:
I know this is not the time, or place to learn some jass, but could you quickly tell me what this function does?
To me, this is a fuction that makes sense:
Code:
function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
if ( not ( IsUnitAliveBJ(GetTriggerUnit()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call ExplodeUnitBJ( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Untitled_Trigger_001, Condition( function Trig_Untitled_Trigger_001_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
out of my jass knowledge will look like this. it will be the same.
Code:
function InitTrig_Untitled_Trigger_001 takes nothing returns boolean
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_ATTACKED )
if ( not ( IsUnitAliveBJ(GetTriggerUnit()) == true ) ) then
return false
endif
return true
call ExplodeUnitBJ( GetTriggerUnit() )
endfunction
my jass skill is rly basic.. but this is what i understood.......
if a unit is attacked. it checks if the triggering unit is still alive.
it returns true or false.
and i think if the triggering unit is alive it explodes the triggering unit.. tho im not rly sure...