找回密码
 点一下
查看: 1783|回复: 1

第一次把T转成J优化,帮忙看看有错没有.

[复制链接]
发表于 2007-3-18 20:47:05 | 显示全部楼层 |阅读模式
看了N多国外JASS演示才搞的,达人帮忙看看有错没有。

///////////////////////////////////////////////////////
function Trig_Skill_F1_Jass_Conditions takes nothing returns boolean
    return ( GetSpellAbilityId() == 'A011' )
endfunction

function Trig_Skill_F1_Jass_Actions takes nothing returns nothing
    local unit Unit1 = GetTriggerUnit()
    local unit Unit2 = GetSpellTargetUnit()
    local location P1
    local location P2
    local real Real = ( 50.00 + I2R(( GetUnitAbilityLevel(Unit1, 'A011') * 50 )) )
    loop
        set P1 = GetUnitLoc(Unit1)
        set P2 = GetUnitLoc(Unit2)
        exitwhen ( IsUnitDeadBJ(Unit2) == true ) or ( DistanceBetweenPoints(P1, P2) > 600.00 )
            call AddSpecialEffectLocBJ( P2, "Abilities\\Weapons\\HydraliskImpact\\HydraliskImpact.mdl" )
            call DestroyEffect( GetLastCreatedEffectBJ() )
            call UnitDamageTarget( Unit1, Unit2, Real, false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS )
            call SetUnitState( Unit1, UNIT_STATE_LIFE, ( GetUnitState(Unit1, UNIT_STATE_LIFE) + ( Real * 0.30 ) ) )
            call CreateTextTagLocBJ( ( I2S(R2I(Real)) + "!" ), P2, 0, 10, 50.00, 40.00, 25.00, 15.00 )
            call SetTextTagPermanent( GetLastCreatedTextTag(), false )
            call SetTextTagLifespan( GetLastCreatedTextTag(), 3.00 )
            call SetTextTagFadepoint( GetLastCreatedTextTag(), 2.50 )
            call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
            call RemoveLocation( P1 )
            call RemoveLocation( P2 )
            call TriggerSleepAction( 3.00 )
    endloop
    call RemoveLocation( P1 )
    call RemoveLocation( P2 )
    set Unit1 = null
    set Unit2 = null
    set P1 = null
    set P2 = null
    set Real = 0
endfunction

//===========================================================================
function InitTrig_Skill_F1_Jass takes nothing returns nothing
    set gg_trg_Skill_F1_Jass = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Skill_F1_Jass, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Skill_F1_Jass, Condition( function Trig_Skill_F1_Jass_Conditions ) )
    call TriggerAddAction( gg_trg_Skill_F1_Jass, function Trig_Skill_F1_Jass_Actions )
endfunction
发表于 2007-3-18 21:59:19 | 显示全部楼层
恩,基本上就是这个样子的
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-11-23 21:11 , Processed in 0.104566 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表