Добавлен Sparrow
Здравствуйте суть моей проблемы в том что когда я обучаю юнита с помощью вот такого кода:
//===========================================================================
function Trig_Tratata_Func002Func007C takes nothing returns boolean
if ( not ( udg_Iron_ore > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Tratata_Func002C takes nothing returns boolean
if ( not ( GetTrainedUnitType() == 'hrif' ) ) then
return false
endif
return true
endfunction
function Trig_Tratata_Func003C takes nothing returns boolean
if ( not ( GetTrainedUnitType() == 'hfoo' ) ) then
return false
endif
return true
endfunction
function Trig_Tratata_Actions takes nothing returns nothing
call RemoveUnit( GetTrainedUnit() )
if ( Trig_Tratata_Func002C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(gg_unit_hbla_0000, 'rat6') )
call UnitAddItemByIdSwapped( 'rat3', gg_unit_hbla_0000 )
call SetPlayerUnitAvailableBJ( 'hrif', true, Player(0) )
call SetPlayerUnitAvailableBJ( 'hfoo', true, Player(0) )
call EnableTrigger( gg_trg_Esle )
if ( Trig_Tratata_Func002Func007C() ) then
call IssueTrainOrderByIdBJ( gg_unit_hbla_0000, 'hrif' )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_Tratata_Func003C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(gg_unit_hbla_0000, 'rat3') )
call RemoveItem( GetItemOfTypeFromUnitBJ(gg_unit_hbla_0000, 'rat3') )
call RemoveItem( GetItemOfTypeFromUnitBJ(gg_unit_hbla_0000, 'rat3') )
call UnitAddItemByIdSwapped( 'frgd', gg_unit_hbla_0000 )
call SetPlayerUnitAvailableBJ( 'hrif', true, Player(0) )
call SetPlayerUnitAvailableBJ( 'hfoo', true, Player(0) )
call EnableTrigger( gg_trg_Esle )
else
endif
endfunction
//===========================================================================
function InitTrig_Tratata takes nothing returns nothing
set gg_trg_Tratata = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Tratata, gg_unit_hbla_0000, EVENT_UNIT_TRAIN_FINISH )
call TriggerAddAction( gg_trg_Tratata, function Trig_Tratata_Actions )
endfunction
//===========================================================================
То после этого я не могу вытаскивать или что либо делать с предметами обучающего
Конкретно скажу что это происходит после этого фрагмента:
Конкретно скажу что это происходит после этого фрагмента:
//===========================================================================
if ( Trig_Tratata_Func002Func007C() ) then
call IssueTrainOrderByIdBJ( gg_unit_hbla_0000, 'hrif' )
else
call DoNothing( )
endif
- Почему это происходит?
- Как это исправить?
Принятый ответ
Опиши что ты хочешь сделать.
`
ОЖИДАНИЕ РЕКЛАМЫ...
Чтобы оставить комментарий, пожалуйста, войдите на сайт.
Отредактирован Sparrow
сразу говорю горячими клавишами не вариант
Раз уж это вопрос
Отредактирован alexprey
Вот посмотри я обновил вопрос там конкретней написано
Самое главное когда я просто юзаю функцию: