找回密码
 点一下
查看: 2229|回复: 5

请问这个JASS什么意思啊

[复制链接]
发表于 2011-6-24 16:05:42 | 显示全部楼层 |阅读模式
function Trig_XSlash_Conditions takes nothing returns boolean
return ((GetSpellAbilityId()=='A011'))
endfunction
function Trig_XSlash_Actions takes nothing returns nothing
set udg_XSlash_Caster=GetSpellAbilityUnit()
set udg_XSlash_Target=GetSpellTargetUnit()
call CreateNUnitsAtLocFacingLocBJ(1,'E008',GetOwningPlayer(udg_XSlash_Caster),PolarProjectionBJ(GetUnitLoc(udg_XSlash_Target),256.00,(AngleBetweenPoints(GetUnitLoc(udg_XSlash_Target),GetUnitLoc(udg_XSlash_Caster))+45.00)),GetUnitLoc(udg_XSlash_Target))
set udg_XSlash_Mirror[0]=bj_lastCreatedUnit
call SetUnitAnimationWithRarity(udg_XSlash_Mirror[0],"attack",RARITY_RARE)
call SetUnitVertexColorBJ(udg_XSlash_Mirror[0],100,100,100,50.00)
call CreateNUnitsAtLocFacingLocBJ(1,'E008',GetOwningPlayer(udg_XSlash_Caster),PolarProjectionBJ(GetUnitLoc(udg_XSlash_Target),256.00,(AngleBetweenPoints(GetUnitLoc(udg_XSlash_Target),GetUnitLoc(udg_XSlash_Caster))-45.00)),GetUnitLoc(udg_XSlash_Target))
set udg_XSlash_Mirror[1]=bj_lastCreatedUnit
call SetUnitAnimationWithRarity(udg_XSlash_Mirror[1],"attack",RARITY_RARE)
call SetUnitVertexColorBJ(udg_XSlash_Mirror[1],100,100,100,50.00)
call PolledWait(GetRandomReal(0.40,0.70))
call AddSpecialEffectTargetUnitBJ("origin",udg_XSlash_Target,"Abilities\\Spells\\Orc\\AncestralSpirit\\AncestralSpiritCaster.mdl")
set bj_forLoopAIndex=0
set bj_forLoopAIndexEnd=1
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call SetUnitTimeScalePercent(udg_XSlash_Mirror[bj_forLoopAIndex],0.00)
call SetUnitPositionLoc(udg_XSlash_Mirror[bj_forLoopAIndex],PolarProjectionBJ(GetUnitLoc(udg_XSlash_Mirror[bj_forLoopAIndex]),512.00,GetUnitFacing(udg_XSlash_Mirror[bj_forLoopAIndex])))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call AddSpecialEffectTargetUnitBJ("origin",udg_XSlash_Mirror[0],"Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl")
call AddSpecialEffectTargetUnitBJ("origin",udg_XSlash_Mirror[1],"Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl")
set bj_forLoopBIndex=6
set bj_forLoopBIndexEnd=10
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call SetUnitVertexColorBJ(udg_XSlash_Mirror[0],100,100,100,((0.00+I2R(bj_forLoopBIndex))*10.00))
call SetUnitVertexColorBJ(udg_XSlash_Mirror[1],100,100,100,((0.00+I2R(bj_forLoopBIndex))*10.00))
call PolledWait(0.05)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call RemoveUnit(udg_XSlash_Mirror[0])
call RemoveUnit(udg_XSlash_Mirror[1])
endfunction

//===========================================================================
function InitTrig_XSlash takes nothing returns nothing
set gg_trg_XSlash=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_XSlash,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_XSlash,Condition(function Trig_XSlash_Conditions))
call TriggerAddAction(gg_trg_XSlash,function Trig_XSlash_Actions)
endfunction

请问这个技能无法复制过去啊,只要是4个ID的我都复制了,变量在哪里啊,?变量在哪里啊!~
发表于 2011-6-24 16:16:10 | 显示全部楼层
完全是T转的。
回复

使用道具 举报

 楼主| 发表于 2011-6-24 16:24:58 | 显示全部楼层
那该怎么解决姐姐啊啊
回复

使用道具 举报

 楼主| 发表于 2011-6-24 16:27:32 | 显示全部楼层
这个 技能呢,,吸血


function Trig_Blood_Bath_Conditions takes nothing returns boolean
    if(GetUnitTypeId(GetDyingUnit())=='n00L')then
        return false
    endif
    if(IsUnitType(GetDyingUnit(),UNIT_TYPE_STRUCTURE))then
        return false
    endif
    if(GetUnitAbilityLevel(GetKillingUnit(),'A0LE')>0)then
        return true
    endif
    return false
endfunction

function Trig_Blood_Bath_Actions takes nothing returns nothing
    local real lr3=.05
    local real lr4
    local effect lfx
    if(IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO))then
        set lr3=.1
    endif
    set lr4=GetUnitAbilityLevel(GetKillingUnit(),'A0LE')*lr3*GetUnitState(GetDyingUnit(),UNIT_STATE_MAX_LIFE)
    call SetWidgetLife(GetKillingUnit(),GetUnitState(GetKillingUnit(),UNIT_STATE_LIFE)+lr4)
    set lfx=AddSpecialEffectTarget("Objects\\\\Spawnmodels\\\\Human\\\\HumanBlood\\\\HeroBloodElfBlood.mdl",GetKillingUnit(),"overhead")
    call PolledWait(1.)
    call DestroyEffect(lfx)
endfunction

function StartTrigger_Blood_Bath takes nothing returns nothing
    set gg_trg_Blood_Bath=CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Blood_Bath,EVENT_PLAYER_UNIT_DEATH)
    call TriggerAddCondition(gg_trg_Blood_Bath,Condition(function Trig_Blood_Bath_Conditions))
    call TriggerAddAction(gg_trg_Blood_Bath,function Trig_Blood_Bath_Actions)
endfunction

function InitTrig_Blood_Bath takes nothing returns nothing
endfunction
回复

使用道具 举报

 楼主| 发表于 2011-6-24 16:28:17 | 显示全部楼层
加我QQ1348773290
地图做好之后绝对火爆!
回复

使用道具 举报

发表于 2011-7-21 21:34:24 | 显示全部楼层
引用楼主bc1990131于2011-06-24 16:05发表的 请问这个JASS什么意思啊 :
请问这个技能无法复制过去啊,只要是4个ID的我都复制了,变量在哪里啊,?变量在哪里啊!~  
我不知道你所说的ID是什么。。至于变量的话,你这个完全T转的变量要在WE里的变量申明框里申明,或者在你的函数最前面用globals申明


比如udg_XSlash_Mirror[1]这个单位变量如果LZ想用globals申明的话就要写成:
globals
          unit array udg_XSlash_Mirror
endglobals
回复

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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