|
初学Jass处于白痴状态,用Jass写触发如下:
function Trig_burst_damage_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'Bcri') == true ) ) then
return false
endif
return true
endfunction
function Trig_burst_damage_Actions takes nothing returns nothing
local location unit_point
local real damage
local texttag damage_text
set unit_point = GetUnitLoc(GetAttacker())
set damage = 4.00 * I2R(GetUnitAbilityLevel(udg_sirius, 'Acri'))
call CreateTextTagLocBJ( R2S(damage), unit_point, 0, 10, 100, 100, 100, 0 )
set damage_text = bj_lastCreatedTextTag
call SetTextTagVelocity( damage_text, 64, 90 )
call UnitDamageTarget( GetAttacker(), GetAttackedUnitBJ(), damage, true, true, ATTACK_TYPE_HERO, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS )
endfunction
//===========================================================================
function InitTrig_burst_damage takes nothing returns nothing
set gg_trg_burst_damage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_burst_damage, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_burst_damage, Condition( function Trig_burst_damage_Conditions ) )
call TriggerAddAction( gg_trg_burst_damage, function Trig_burst_damage_Actions )
endfunction
结果发现漂浮文字没有显示,其余部分正常,求高人解答…… |
|