function zemle takes nothing returns nothing
local unit u = GetTriggerUnit()
local player p = GetTriggerPlayer()
local group g = CreateGroup()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real Random = GetRandomReal(0, 360)
local boolean b =( IsUnitEnemy(GetFilterUnit(), p) == true )
local boolexpr d Condition(b)
call GroupEnumUnitsInRange( g, x, y, 850, d )
call ForGroup( g, function zemlee )
call UnitApplyTimedLife(CreateUnit (p, 'h007',x,y,Random),'BFiq',0.50 )
call DestroyGroup(g)
set u = null
set p = null
set g = null
endfunction
где тут ошыбка и как её исправить чтоб работала всё
local unit u = GetTriggerUnit()
local player p = GetTriggerPlayer()
local group g = CreateGroup()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real Random = GetRandomReal(0, 360)
local boolean b =( IsUnitEnemy(GetFilterUnit(), p) == true )
local boolexpr d Condition(b)
call GroupEnumUnitsInRange( g, x, y, 850, d )
call ForGroup( g, function zemlee )
call UnitApplyTimedLife(CreateUnit (p, 'h007',x,y,Random),'BFiq',0.50 )
call DestroyGroup(g)
set u = null
set p = null
set g = null
endfunction
где тут ошыбка и как её исправить чтоб работала всё
Принятый ответ
globals
player Pl = null
endglobals
function abc takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), Pl)
endfunction
function zemle takes nothing returns nothing
local unit u = GetTriggerUnit()
local group g = CreateGroup()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real Random = GetRandomReal(0, 360)
local boolexpr d = Condition(function abc)
set Pl = GetTriggerPlayer()
call GroupEnumUnitsInRange( g, x, y, 850, d )
call ForGroup( g, function zemlee )
call UnitApplyTimedLife(CreateUnit (p, 'h007',x,y,Random),'BFiq',0.50 ) // ???
call DestroyGroup(g)
call DestroyBoolexpr(d)
set u = null
set p = null
set g = null
set d =null
endfunction
Чтобы оставить комментарий, пожалуйста, войдите на сайт.
Вот, пожалуйста.
Какую ошибку то хоть выдаёт, можно поделиться? Что должно быть в результате? Или это тест на телепатические способности?
Отредактирован scopterectus
И про то что есть bj_groupEnumOwningPlayer вы тоже не знаете?