- Joined
- Jan 1, 2005
- Messages
- 133
hi every1 i need help implenting this group of triggers in Script form in2 my starcraft conversion maps. I got these from the war3map.j script file from the 4SamuroLostTemple Map. Every time i add them in and try and save or test the map i get a whole bunch of errors and wont let me continue or play the map from WME. I get like 'expected a name' error and 'void' errors. Now i dont know if anby1 can figure this out cuz i dont know if there is a variable or another trigger needed but i thought id try and post this for any help any1 can give me.
//===========================================================================
// Trigger: ShowPylonField
//===========================================================================
function Trig_ShowPylonField_Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_ShowPylonField_Conditions takes nothing returns boolean
if ( not Trig_ShowPylonField_Func003C() ) then
return false
endif
return true
endfunction
function Trig_ShowPylonField_Func001A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_ShowPylonField_Func002001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hhou' )
endfunction
function Trig_ShowPylonField_Func002001002002 takes nothing returns boolean
return ( IstUnfertig(GetFilterUnit()) == false )
endfunction
function Trig_ShowPylonField_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_ShowPylonField_Func002001002001(), Trig_ShowPylonField_Func002001002002() )
endfunction
function Trig_ShowPylonField_Func002A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h002', GetTriggerPlayer(), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100.00, 100.00, 100.00, 50.00 )
endfunction
function Trig_ShowPylonField_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'h002'), function Trig_ShowPylonField_Func001A )
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_ShowPylonField_Func002001002)), function Trig_ShowPylonField_Func002A )
endfunction
//===========================================================================
function InitTrig_ShowPylonField takes nothing returns nothing
set gg_trg_ShowPylonField = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(5), true )
call TriggerAddCondition( gg_trg_ShowPylonField, Condition( function Trig_ShowPylonField_Conditions ) )
call TriggerAddAction( gg_trg_ShowPylonField, function Trig_ShowPylonField_Actions )
endfunction
//===========================================================================
// Trigger: Pylons New
//===========================================================================
function Trig_Pylons_New_Func004C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("humanbarracks") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("workshop") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blacksmith") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("guardtower") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("gryphonaviary") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("arcanesanctum") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("humanlumbermill") ) ) then
return true
endif
return false
endfunction
function Trig_Pylons_New_Conditions takes nothing returns boolean
if ( not Trig_Pylons_New_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Pylons_New_Func002Func007A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Pylons_New_Func002Func008001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hhou' )
endfunction
function Trig_Pylons_New_Func002Func008001002002 takes nothing returns boolean
return ( IstUnfertig(GetFilterUnit()) == false )
endfunction
function Trig_Pylons_New_Func002Func008001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Pylons_New_Func002Func008001002001(), Trig_Pylons_New_Func002Func008001002002() )
endfunction
function Trig_Pylons_New_Func002Func008A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100.00, 100.00, 100.00, 50.00 )
endfunction
function Trig_Pylons_New_Func002Func009C takes nothing returns boolean
if ( ( udg_Pylon == null ) ) then
return true
endif
return false
endfunction
function Trig_Pylons_New_Func002C takes nothing returns boolean
if ( not Trig_Pylons_New_Func002Func009C() ) then
return false
endif
return true
endfunction
function Trig_Pylons_New_Actions takes nothing returns nothing
set udg_Pylon = FindPylon( GetOrderPointLoc(), GetOwningPlayer(GetOrderedUnit()), Condition(function PylonCondition) )
if ( Trig_Pylons_New_Func002C() ) then
call IssuePointOrderByIdLoc( GetOrderedUnit(), udg_Order, GetUnitLoc(udg_Pylon) )
call IssuePointOrderLocBJ( GetOrderedUnit(), "move", GetUnitLoc(GetOrderedUnit()) )
call SetUnitFacingToFaceLocTimed( GetOrderedUnit(), GetOrderPointLoc(), 0.25 )
call ErrorMsg( GetOwningPlayer(GetTriggerUnit()), "You must build near a Pylon !" )
set udg_Pylon = null
call TriggerSleepAction( 0.01 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'h002'), function Trig_Pylons_New_Func002Func007A )
call ForGroupBJ( GetUnitsOfPlayerMatching(GetOwningPlayer(GetTriggerUnit()), Condition(function Trig_Pylons_New_Func002Func008001002)), function Trig_Pylons_New_Func002Func008A )
else
endif
endfunction
//===========================================================================
function InitTrig_Pylons_New takes nothing returns nothing
set gg_trg_Pylons_New = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pylons_New, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Pylons_New, Condition( function Trig_Pylons_New_Conditions ) )
call TriggerAddAction( gg_trg_Pylons_New, function Trig_Pylons_New_Actions )
endfunction
//===========================================================================
// Trigger: Pylons Destroyed
//===========================================================================
function Trig_Pylons_Destroyed_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_Pylons_Destroyed_Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_Pylon == null ) ) then
return false
endif
return true
endfunction
function Trig_Pylons_Destroyed_Func001Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hbar' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hlum' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hbla' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'harm' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hars' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hgra' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hgtw' ) ) then
return true
endif
return false
endfunction
function Trig_Pylons_Destroyed_Func001Func001C takes nothing returns boolean
if ( not Trig_Pylons_Destroyed_Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Pylons_Destroyed_Func001A takes nothing returns nothing
if ( Trig_Pylons_Destroyed_Func001Func001C() ) then
set udg_Pylon = FindPylon( GetUnitLoc(GetEnumUnit()), GetOwningPlayer(GetEnumUnit()), Condition(function PylonCondition) )
if ( Trig_Pylons_Destroyed_Func001Func001Func002C() ) then
call SetUnitUserData( GetEnumUnit(), GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit())) )
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_PASSIVE), false )
call UnitShareVisionBJ( true, GetEnumUnit(), ConvertedPlayer(GetUnitUserData(GetEnumUnit())) )
set udg_Pylon = null
else
endif
else
endif
endfunction
function Trig_Pylons_Destroyed_Func002Func001004001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'hhou' )
endfunction
function Trig_Pylons_Destroyed_Func002Func001004002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'htow' )
endfunction
function Trig_Pylons_Destroyed_Func002Func001004002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'n002' )
endfunction
function Trig_Pylons_Destroyed_Func002Func001004002 takes nothing returns boolean
return GetBooleanOr( Trig_Pylons_Destroyed_Func002Func001004002001(), Trig_Pylons_Destroyed_Func002Func001004002002() )
endfunction
function Trig_Pylons_Destroyed_Func002Func001004 takes nothing returns boolean
return GetBooleanOr( Trig_Pylons_Destroyed_Func002Func001004001(), Trig_Pylons_Destroyed_Func002Func001004002() )
endfunction
function Trig_Pylons_Destroyed_Func002A takes nothing returns nothing
call GroupEnumUnitsInRangeOfLoc( udg_Temp_Group, GetUnitLoc(GetEnumUnit()), 650.00, Condition(function Trig_Pylons_Destroyed_Func002Func001004) )
endfunction
function Trig_Pylons_Destroyed_Func003Func001C takes nothing returns boolean
if ( not ( GetUnitUserData(GetEnumUnit()) == GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) ) ) then
return false
endif
return true
endfunction
function Trig_Pylons_Destroyed_Func003A takes nothing returns nothing
if ( Trig_Pylons_Destroyed_Func003Func001C() ) then
call SetUnitOwner( GetEnumUnit(), GetOwningPlayer(GetTriggerUnit()), false )
else
endif
endfunction
function Trig_Pylons_Destroyed_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetTriggerUnit())), function Trig_Pylons_Destroyed_Func001A )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'hhou'), function Trig_Pylons_Destroyed_Func002A )
call ForGroupBJ( udg_Temp_Group, function Trig_Pylons_Destroyed_Func003A )
call GroupClear( udg_Temp_Group )
endfunction
//===========================================================================
function InitTrig_Pylons_Destroyed takes nothing returns nothing
set gg_trg_Pylons_Destroyed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pylons_Destroyed, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Pylons_Destroyed, Condition( function Trig_Pylons_Destroyed_Conditions ) )
call TriggerAddAction( gg_trg_Pylons_Destroyed, function Trig_Pylons_Destroyed_Actions )
endfunction
//===========================================================================
// Trigger: Pylons Rebuild
//===========================================================================
function Trig_Pylons_Rebuild_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_Pylons_Rebuild_Func001001003 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_PASSIVE) )
endfunction
function Trig_Pylons_Rebuild_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitUserData(GetEnumUnit()) == GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) ) ) then
return false
endif
return true
endfunction
function Trig_Pylons_Rebuild_Func001A takes nothing returns nothing
if ( Trig_Pylons_Rebuild_Func001Func001C() ) then
call SetUnitOwner( GetEnumUnit(), GetOwningPlayer(GetTriggerUnit()), false )
else
endif
endfunction
function Trig_Pylons_Rebuild_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(650.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_Pylons_Rebuild_Func001001003)), function Trig_Pylons_Rebuild_Func001A )
endfunction
//===========================================================================
function InitTrig_Pylons_Rebuild takes nothing returns nothing
set gg_trg_Pylons_Rebuild = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pylons_Rebuild, EVENT_PLAYER_UNIT_CONSTRUCT_FINISH )
call TriggerAddCondition( gg_trg_Pylons_Rebuild, Condition( function Trig_Pylons_Rebuild_Conditions ) )
call TriggerAddAction( gg_trg_Pylons_Rebuild, function Trig_Pylons_Rebuild_Actions )
endfunction
//===========================================================================
// Trigger: feldanzeigenOnPylon
//===========================================================================
function Trig_feldanzeigenOnPylon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_feldanzeigenOnPylon_Func001A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_feldanzeigenOnPylon_Func002Func001C takes nothing returns boolean
if ( not ( IstUnfertig(GetEnumUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_feldanzeigenOnPylon_Func002A takes nothing returns nothing
if ( Trig_feldanzeigenOnPylon_Func002Func001C() ) then
call CreateNUnitsAtLoc( 1, 'h002', GetTriggerPlayer(), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
else
endif
endfunction
function Trig_feldanzeigenOnPylon_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'h002'), function Trig_feldanzeigenOnPylon_Func001A )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'hhou'), function Trig_feldanzeigenOnPylon_Func002A )
endfunction
//===========================================================================
function InitTrig_feldanzeigenOnPylon takes nothing returns nothing
set gg_trg_feldanzeigenOnPylon = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_feldanzeigenOnPylon, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_feldanzeigenOnPylon, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_feldanzeigenOnPylon, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_feldanzeigenOnPylon, Player(3), true )
call TriggerAddCondition( gg_trg_feldanzeigenOnPylon, Condition( function Trig_feldanzeigenOnPylon_Conditions ) )
call TriggerAddAction( gg_trg_feldanzeigenOnPylon, function Trig_feldanzeigenOnPylon_Actions )
endfunction
//===========================================================================
// Trigger: felddeaktivierenOnBuild
//===========================================================================
function Trig_felddeaktivierenOnBuild_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) != 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_felddeaktivierenOnBuild_Func002A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_felddeaktivierenOnBuild_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'h002'), function Trig_felddeaktivierenOnBuild_Func002A )
endfunction
//===========================================================================
function InitTrig_felddeaktivierenOnBuild takes nothing returns nothing
set gg_trg_felddeaktivierenOnBuild = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_felddeaktivierenOnBuild, Player(0), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_felddeaktivierenOnBuild, Player(1), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_felddeaktivierenOnBuild, Player(2), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_felddeaktivierenOnBuild, Player(3), false )
call TriggerAddCondition( gg_trg_felddeaktivierenOnBuild, Condition( function Trig_felddeaktivierenOnBuild_Conditions ) )
call TriggerAddAction( gg_trg_felddeaktivierenOnBuild, function Trig_felddeaktivierenOnBuild_Actions )
endfunction
//===========================================================================
// Trigger: felddeaktivierenOnBuild3
//===========================================================================
function Trig_felddeaktivierenOnBuild3_Func002C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("humanbarracks") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("workshop") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blacksmith") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("guardtower") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("gryphonaviary") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("arcanesanctum") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("humanlumbermill") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("humanlumbermill") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("farm") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("townhall") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("custom_n002") ) ) then
return true
endif
return false
endfunction
function Trig_felddeaktivierenOnBuild3_Conditions takes nothing returns boolean
if ( not Trig_felddeaktivierenOnBuild3_Func002C() ) then
return false
endif
return true
endfunction
function Trig_felddeaktivierenOnBuild3_Func001A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_felddeaktivierenOnBuild3_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'h002'), function Trig_felddeaktivierenOnBuild3_Func001A )
endfunction
//===========================================================================
function InitTrig_felddeaktivierenOnBuild3 takes nothing returns nothing
set gg_trg_felddeaktivierenOnBuild3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_felddeaktivierenOnBuild3, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_felddeaktivierenOnBuild3, Condition( function Trig_felddeaktivierenOnBuild3_Conditions ) )
call TriggerAddAction( gg_trg_felddeaktivierenOnBuild3, function Trig_felddeaktivierenOnBuild3_Actions )
endfunction
i cant give exact postions of the errors cuz there r so many, and i dont have a clue wat all this coding really means. if u try and implentment these codes in2 a map and c wat happens ull probably get the errors 2 and c 4 urself. i have a starcraft maps on this website which have the plyon field abilities that activate for thsi trigger soi u can download the map and use it as a fuck up map if u need the abilites 2 get it 2 work rite. If any1 needs more info on wats how they can help me just post questions and ill try and post replys asap.
thanx every1
//===========================================================================
// Trigger: ShowPylonField
//===========================================================================
function Trig_ShowPylonField_Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_ShowPylonField_Conditions takes nothing returns boolean
if ( not Trig_ShowPylonField_Func003C() ) then
return false
endif
return true
endfunction
function Trig_ShowPylonField_Func001A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_ShowPylonField_Func002001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hhou' )
endfunction
function Trig_ShowPylonField_Func002001002002 takes nothing returns boolean
return ( IstUnfertig(GetFilterUnit()) == false )
endfunction
function Trig_ShowPylonField_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_ShowPylonField_Func002001002001(), Trig_ShowPylonField_Func002001002002() )
endfunction
function Trig_ShowPylonField_Func002A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h002', GetTriggerPlayer(), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100.00, 100.00, 100.00, 50.00 )
endfunction
function Trig_ShowPylonField_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'h002'), function Trig_ShowPylonField_Func001A )
call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_ShowPylonField_Func002001002)), function Trig_ShowPylonField_Func002A )
endfunction
//===========================================================================
function InitTrig_ShowPylonField takes nothing returns nothing
set gg_trg_ShowPylonField = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_ShowPylonField, Player(5), true )
call TriggerAddCondition( gg_trg_ShowPylonField, Condition( function Trig_ShowPylonField_Conditions ) )
call TriggerAddAction( gg_trg_ShowPylonField, function Trig_ShowPylonField_Actions )
endfunction
//===========================================================================
// Trigger: Pylons New
//===========================================================================
function Trig_Pylons_New_Func004C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("humanbarracks") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("workshop") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blacksmith") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("guardtower") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("gryphonaviary") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("arcanesanctum") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("humanlumbermill") ) ) then
return true
endif
return false
endfunction
function Trig_Pylons_New_Conditions takes nothing returns boolean
if ( not Trig_Pylons_New_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Pylons_New_Func002Func007A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Pylons_New_Func002Func008001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hhou' )
endfunction
function Trig_Pylons_New_Func002Func008001002002 takes nothing returns boolean
return ( IstUnfertig(GetFilterUnit()) == false )
endfunction
function Trig_Pylons_New_Func002Func008001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Pylons_New_Func002Func008001002001(), Trig_Pylons_New_Func002Func008001002002() )
endfunction
function Trig_Pylons_New_Func002Func008A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h002', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100.00, 100.00, 100.00, 50.00 )
endfunction
function Trig_Pylons_New_Func002Func009C takes nothing returns boolean
if ( ( udg_Pylon == null ) ) then
return true
endif
return false
endfunction
function Trig_Pylons_New_Func002C takes nothing returns boolean
if ( not Trig_Pylons_New_Func002Func009C() ) then
return false
endif
return true
endfunction
function Trig_Pylons_New_Actions takes nothing returns nothing
set udg_Pylon = FindPylon( GetOrderPointLoc(), GetOwningPlayer(GetOrderedUnit()), Condition(function PylonCondition) )
if ( Trig_Pylons_New_Func002C() ) then
call IssuePointOrderByIdLoc( GetOrderedUnit(), udg_Order, GetUnitLoc(udg_Pylon) )
call IssuePointOrderLocBJ( GetOrderedUnit(), "move", GetUnitLoc(GetOrderedUnit()) )
call SetUnitFacingToFaceLocTimed( GetOrderedUnit(), GetOrderPointLoc(), 0.25 )
call ErrorMsg( GetOwningPlayer(GetTriggerUnit()), "You must build near a Pylon !" )
set udg_Pylon = null
call TriggerSleepAction( 0.01 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'h002'), function Trig_Pylons_New_Func002Func007A )
call ForGroupBJ( GetUnitsOfPlayerMatching(GetOwningPlayer(GetTriggerUnit()), Condition(function Trig_Pylons_New_Func002Func008001002)), function Trig_Pylons_New_Func002Func008A )
else
endif
endfunction
//===========================================================================
function InitTrig_Pylons_New takes nothing returns nothing
set gg_trg_Pylons_New = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pylons_New, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Pylons_New, Condition( function Trig_Pylons_New_Conditions ) )
call TriggerAddAction( gg_trg_Pylons_New, function Trig_Pylons_New_Actions )
endfunction
//===========================================================================
// Trigger: Pylons Destroyed
//===========================================================================
function Trig_Pylons_Destroyed_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_Pylons_Destroyed_Func001Func001Func002C takes nothing returns boolean
if ( not ( udg_Pylon == null ) ) then
return false
endif
return true
endfunction
function Trig_Pylons_Destroyed_Func001Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hbar' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hlum' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hbla' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'harm' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hars' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hgra' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'hgtw' ) ) then
return true
endif
return false
endfunction
function Trig_Pylons_Destroyed_Func001Func001C takes nothing returns boolean
if ( not Trig_Pylons_Destroyed_Func001Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Pylons_Destroyed_Func001A takes nothing returns nothing
if ( Trig_Pylons_Destroyed_Func001Func001C() ) then
set udg_Pylon = FindPylon( GetUnitLoc(GetEnumUnit()), GetOwningPlayer(GetEnumUnit()), Condition(function PylonCondition) )
if ( Trig_Pylons_Destroyed_Func001Func001Func002C() ) then
call SetUnitUserData( GetEnumUnit(), GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit())) )
call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_PASSIVE), false )
call UnitShareVisionBJ( true, GetEnumUnit(), ConvertedPlayer(GetUnitUserData(GetEnumUnit())) )
set udg_Pylon = null
else
endif
else
endif
endfunction
function Trig_Pylons_Destroyed_Func002Func001004001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'hhou' )
endfunction
function Trig_Pylons_Destroyed_Func002Func001004002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'htow' )
endfunction
function Trig_Pylons_Destroyed_Func002Func001004002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'n002' )
endfunction
function Trig_Pylons_Destroyed_Func002Func001004002 takes nothing returns boolean
return GetBooleanOr( Trig_Pylons_Destroyed_Func002Func001004002001(), Trig_Pylons_Destroyed_Func002Func001004002002() )
endfunction
function Trig_Pylons_Destroyed_Func002Func001004 takes nothing returns boolean
return GetBooleanOr( Trig_Pylons_Destroyed_Func002Func001004001(), Trig_Pylons_Destroyed_Func002Func001004002() )
endfunction
function Trig_Pylons_Destroyed_Func002A takes nothing returns nothing
call GroupEnumUnitsInRangeOfLoc( udg_Temp_Group, GetUnitLoc(GetEnumUnit()), 650.00, Condition(function Trig_Pylons_Destroyed_Func002Func001004) )
endfunction
function Trig_Pylons_Destroyed_Func003Func001C takes nothing returns boolean
if ( not ( GetUnitUserData(GetEnumUnit()) == GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) ) ) then
return false
endif
return true
endfunction
function Trig_Pylons_Destroyed_Func003A takes nothing returns nothing
if ( Trig_Pylons_Destroyed_Func003Func001C() ) then
call SetUnitOwner( GetEnumUnit(), GetOwningPlayer(GetTriggerUnit()), false )
else
endif
endfunction
function Trig_Pylons_Destroyed_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetTriggerUnit())), function Trig_Pylons_Destroyed_Func001A )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'hhou'), function Trig_Pylons_Destroyed_Func002A )
call ForGroupBJ( udg_Temp_Group, function Trig_Pylons_Destroyed_Func003A )
call GroupClear( udg_Temp_Group )
endfunction
//===========================================================================
function InitTrig_Pylons_Destroyed takes nothing returns nothing
set gg_trg_Pylons_Destroyed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pylons_Destroyed, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Pylons_Destroyed, Condition( function Trig_Pylons_Destroyed_Conditions ) )
call TriggerAddAction( gg_trg_Pylons_Destroyed, function Trig_Pylons_Destroyed_Actions )
endfunction
//===========================================================================
// Trigger: Pylons Rebuild
//===========================================================================
function Trig_Pylons_Rebuild_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_Pylons_Rebuild_Func001001003 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_PASSIVE) )
endfunction
function Trig_Pylons_Rebuild_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitUserData(GetEnumUnit()) == GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) ) ) then
return false
endif
return true
endfunction
function Trig_Pylons_Rebuild_Func001A takes nothing returns nothing
if ( Trig_Pylons_Rebuild_Func001Func001C() ) then
call SetUnitOwner( GetEnumUnit(), GetOwningPlayer(GetTriggerUnit()), false )
else
endif
endfunction
function Trig_Pylons_Rebuild_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(650.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_Pylons_Rebuild_Func001001003)), function Trig_Pylons_Rebuild_Func001A )
endfunction
//===========================================================================
function InitTrig_Pylons_Rebuild takes nothing returns nothing
set gg_trg_Pylons_Rebuild = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pylons_Rebuild, EVENT_PLAYER_UNIT_CONSTRUCT_FINISH )
call TriggerAddCondition( gg_trg_Pylons_Rebuild, Condition( function Trig_Pylons_Rebuild_Conditions ) )
call TriggerAddAction( gg_trg_Pylons_Rebuild, function Trig_Pylons_Rebuild_Actions )
endfunction
//===========================================================================
// Trigger: feldanzeigenOnPylon
//===========================================================================
function Trig_feldanzeigenOnPylon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_feldanzeigenOnPylon_Func001A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_feldanzeigenOnPylon_Func002Func001C takes nothing returns boolean
if ( not ( IstUnfertig(GetEnumUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_feldanzeigenOnPylon_Func002A takes nothing returns nothing
if ( Trig_feldanzeigenOnPylon_Func002Func001C() ) then
call CreateNUnitsAtLoc( 1, 'h002', GetTriggerPlayer(), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
else
endif
endfunction
function Trig_feldanzeigenOnPylon_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'h002'), function Trig_feldanzeigenOnPylon_Func001A )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'hhou'), function Trig_feldanzeigenOnPylon_Func002A )
endfunction
//===========================================================================
function InitTrig_feldanzeigenOnPylon takes nothing returns nothing
set gg_trg_feldanzeigenOnPylon = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_feldanzeigenOnPylon, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_feldanzeigenOnPylon, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_feldanzeigenOnPylon, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_feldanzeigenOnPylon, Player(3), true )
call TriggerAddCondition( gg_trg_feldanzeigenOnPylon, Condition( function Trig_feldanzeigenOnPylon_Conditions ) )
call TriggerAddAction( gg_trg_feldanzeigenOnPylon, function Trig_feldanzeigenOnPylon_Actions )
endfunction
//===========================================================================
// Trigger: felddeaktivierenOnBuild
//===========================================================================
function Trig_felddeaktivierenOnBuild_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) != 'hhou' ) ) then
return false
endif
return true
endfunction
function Trig_felddeaktivierenOnBuild_Func002A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_felddeaktivierenOnBuild_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'h002'), function Trig_felddeaktivierenOnBuild_Func002A )
endfunction
//===========================================================================
function InitTrig_felddeaktivierenOnBuild takes nothing returns nothing
set gg_trg_felddeaktivierenOnBuild = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_felddeaktivierenOnBuild, Player(0), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_felddeaktivierenOnBuild, Player(1), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_felddeaktivierenOnBuild, Player(2), false )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_felddeaktivierenOnBuild, Player(3), false )
call TriggerAddCondition( gg_trg_felddeaktivierenOnBuild, Condition( function Trig_felddeaktivierenOnBuild_Conditions ) )
call TriggerAddAction( gg_trg_felddeaktivierenOnBuild, function Trig_felddeaktivierenOnBuild_Actions )
endfunction
//===========================================================================
// Trigger: felddeaktivierenOnBuild3
//===========================================================================
function Trig_felddeaktivierenOnBuild3_Func002C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("humanbarracks") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("workshop") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blacksmith") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("guardtower") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("gryphonaviary") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("arcanesanctum") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("humanlumbermill") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("humanlumbermill") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("farm") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("townhall") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("custom_n002") ) ) then
return true
endif
return false
endfunction
function Trig_felddeaktivierenOnBuild3_Conditions takes nothing returns boolean
if ( not Trig_felddeaktivierenOnBuild3_Func002C() ) then
return false
endif
return true
endfunction
function Trig_felddeaktivierenOnBuild3_Func001A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_felddeaktivierenOnBuild3_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'h002'), function Trig_felddeaktivierenOnBuild3_Func001A )
endfunction
//===========================================================================
function InitTrig_felddeaktivierenOnBuild3 takes nothing returns nothing
set gg_trg_felddeaktivierenOnBuild3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_felddeaktivierenOnBuild3, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_felddeaktivierenOnBuild3, Condition( function Trig_felddeaktivierenOnBuild3_Conditions ) )
call TriggerAddAction( gg_trg_felddeaktivierenOnBuild3, function Trig_felddeaktivierenOnBuild3_Actions )
endfunction
i cant give exact postions of the errors cuz there r so many, and i dont have a clue wat all this coding really means. if u try and implentment these codes in2 a map and c wat happens ull probably get the errors 2 and c 4 urself. i have a starcraft maps on this website which have the plyon field abilities that activate for thsi trigger soi u can download the map and use it as a fuck up map if u need the abilites 2 get it 2 work rite. If any1 needs more info on wats how they can help me just post questions and ill try and post replys asap.
thanx every1