D.V.D
Make a wish
- Reaction score
- 73
Ok, i made this trigger and im getting errors on the locals and the damage part. Here's the code:
The local gives me an error saying expects a endif and the damage function expects a name because the local doesn't work. Thanks in advance .
JASS:
function Trig_Critical_Strike_Conditions takes nothing returns boolean
if ( not ( IsUnitAliveBJ(GetAttackedUnitBJ()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Critical_Strike_Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 100) <= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Critical_Strike_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped(039;AOcr039;, GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Critical_Strike_Actions takes nothing returns nothing
if ( Trig_Critical_Strike_Func001C() ) then
if ( Trig_Critical_Strike_Func001Func001C() ) then
else
endif
local interger Strength = GetHeroStatBJ(bj_HEROSTAT_STR, GetTriggeringUnit(), true)
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), I2R(Strength), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
//===========================================================================
function InitTrig_Critical_Strike takes nothing returns nothing
set gg_trg_Critical_Strike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Critical_Strike, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Critical_Strike, Condition( function Trig_Critical_Strike_Conditions ) )
call TriggerAddAction( gg_trg_Critical_Strike, function Trig_Critical_Strike_Actions )
endfunction
The local gives me an error saying expects a endif and the damage function expects a name because the local doesn't work. Thanks in advance .