[/table] |
另外的一个问题如下,下面的红色部分.我想问下,应该以怎样的格式来改这些名字呢? |
希望有高手把它改写成J.让我学习下.在下不胜感激. |
|
[jass] |
function Trig_attack_function_kof97_______u_Conditions takes nothing returns boolean |
if ( not ( GetUnitTypeId(GetAttacker()) == 'Hpal' ) ) then |
return false |
endif |
return true |
endfunction |
function Trig_attack_function_kof97_______u_ takes nothing returns boolean |
return ( IsUnitAliveBJ(GetFilterUnit()) == true ) |
endfunction |
function Trig_attack_function_kof97_______u_ takes nothing returns boolean |
return ( IsUnitAlly(GetFilterUnit(), GetOwningPlayer(udg_kof97hero)) == false ) |
endfunction |
function Trig_attack_function_kof97_______u_ takes nothing returns boolean |
return GetBooleanAnd( Trig_attack_function_kof97_______u_Func007002003001(), Trig_attack_function_kof97_______u_Func007002003002() ) |
endfunction |
function Trig_attack_function_kof97_______u_ nothing returns nothing |
call UnitDamageTarget( udg_kof97hero, GetEnumUnit(), ( I2R(udg_heroattribute) * I2R(udg_herooverall) ), true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS ) |
endfunction |
function Trig_attack_function_kof97_______u_Actions takes nothing returns nothing |
call TriggerSleepAction( 0.10 ) |
call DisableTrigger( GetTriggeringTrigger() ) |
set udg_kof97hero = GetAttacker() |
set udg_pointfunction = GetUnitLoc(GetAttackedUnitBJ()) |
set udg_heroattribute = 100 |
set udg_herooverall = 10 |
set udg_uib = GetUnitsInRangeOfLocMatching(100.00, udg_pointfunction, Condition(function Trig_attack_function_kof97_______u_Func007002003)) |
set udg_JNX = 1 |
loop |
exitwhen udg_JNX > 10 |
set udg_JNY = 1 |
loop |
exitwhen udg_JNY > 17 |
set udg_functionpoint = PolarProjectionBJ(udg_pointfunction, ( 100.00 * I2R(udg_JNX) ), ( 20.00 * I2R(udg_JNY) )) |
call DestroyEffect( AddSpecialEffectLoc("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl", udg_functionpoint) ) |
call DestroyEffect( AddSpecialEffectLoc("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl", udg_functionpoint) ) |
call DestroyEffect( AddSpecialEffectLoc("Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl", udg_functionpoint) ) |
call DestroyEffect( AddSpecialEffectLoc("Abilities\\Spells\\Orc\\LiquidFire\\Liquidfire.mdl", udg_functionpoint) ) |
call RemoveLocation( udg_functionpoint ) |
set udg_JNY = udg_JNY + 1 |
endloop |
set udg_JNX = udg_JNX + 1 |
endloop |
call ForGroupBJ( udg_uib, function Trig_attack_function_kof97_______u_Func009A ) |
call DestroyGroup( udg_uib ) |
call RemoveLocation( udg_pointfunction ) |
call EnableTrigger( GetTriggeringTrigger() ) |
endfunction |
//=========================================================================== |
function InitTrig_attack_function_kof97_______u takes nothing returns nothing |
set gg_trg_attack_function_kof97_______u = CreateTrigger( ) |
call TriggerRegisterAnyUnitEventBJ( gg_trg_attack_function_kof97_______u, EVENT_PLAYER_UNIT_ATTACKED ) |
call TriggerAddCondition( gg_trg_attack_function_kof97_______u, Condition( function Trig_attack_function_kof97_______u_Conditions ) ) |
call TriggerAddAction( gg_trg_attack_function_kof97_______u, function Trig_attack_function_kof97_______u_Actions ) |
endfunction |
[/jass] |
|
接下来是关于函数的问题.我尝试着把上面的J按着教程转换成函数.但是到了一个地方卡住了,如下的黄色部分. | |
[jass] |
function kof97attack takes nothing returns nothing |
call TriggerSleepAction( 0.10 ) |
call DisableTrigger( GetTriggeringTrigger() ) |
local unit kof97hero = GetAttacker() |
local location pointfunction = GetUnitLoc(GetAttackedUnitBJ()) |
local integer heroattribute = 100 |
local integer herooverall = 10 |
local group uib = GetUnitsInRangeOfLocMatching(100.00, udg_pointfunction, Condition(function Trig_attack_function_kof97_______u_Func007002003)) |
local integer JNX = 1 |
loop |
exitwhen JNX > 10 |
local integer JNY = 1 |
loop |
exitwhen JNY > 17 |
set functionpoint = PolarProjectionBJ(udg_pointfunction, ( 100.00 * I2R(udg_JNX) ), ( 20.00 * I2R(udg_JNY) )) |
call DestroyEffect( AddSpecialEffectLoc("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl", udg_functionpoint) ) |
call DestroyEffect( AddSpecialEffectLoc("Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl", udg_functionpoint) ) |
call DestroyEffect( AddSpecialEffectLoc("Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl", udg_functionpoint) ) |
call DestroyEffect( AddSpecialEffectLoc("Abilities\\Spells\\Orc\\LiquidFire\\Liquidfire.mdl", udg_functionpoint) ) |
call RemoveLocation( udg_functionpoint ) |
set JNY = udg_JNY + 1 |
endloop |
set JNX = JNX + 1 |
endloop |
call ForGroupBJ( uib, [table=100%,#ffff00]function Trig_attack_function_kof97_______u_Func009A |
)