Warcraft III resources & community, 2003–2006 · archived

Starcraft Plyonfield Script help

7 posts
#1

Starcraft Plyonfield Script help

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
#2
The Scripts are made with WEU and require WEU's advanced trigger functions to be implanted into your map.
#3
thanx for ur post Dr Super Good, wats a WEU?? is it a special Editor Program for advance triggers? is there anyway u can help me 2 get this trigger 2 work or do i need this WEU program??
#4
You need to uses WEU.
WEU = [W]orld [E]ditor [U]nlimated

The program luckily is free.
DL it here
http://www.wc3sear.ch/?p=Tools&ID=17

Then install it and get it to implimate advanced trigger functions into your map.

I cant tell you anymore unless I have the orignal source map that you got this script from.
Tell me where to dl it if you can.
#5
Kool i was able 2 download WEU and im working on trying 2 understand the program and getting these triggers 2 work. Thanx for letting me know bout WEU i didnt even know it existed. Anyways Now i tried 2 implentment the plyon triggers in2 1 of my maps and then the other triggers i was using came up with the same errors this time. Im going 2 c if i can get just these triggers 2 work first and then cum back 2 u if i have any other problems.

As for the original map itself its the 4SamuroLostTemple map on this site http://www.wc3sear.ch/?p=Maps&ID=2353 but trhe map is protected and u cant open the map in the WE. I used winmqp 2 find the war3map.j script file and extracted it 2 c this coding. If u need the complete script i can post it for u but thats if u need it 2 help em out. if im lucky i can get these triggers 2 work fine. Ill let u know on my progress Dr. ok
thanx again for ur help
#6
well ive made sum progess on this script lately. I have been able 2 understand and change the unit raw data 2 target pacific buildings and so forth in the coding. But i still havent been able 2 implentment yet. im down to 2 errors.

here is the handle variable used in my maps.

//*********************************************************************************************
//*
//* Handle Variables
//*
//*********************************************************************************************

//=============================================================================================
// Return Bug Exploiters
//=============================================================================================
function HandleVars_GetInt takes handle h returns integer
return h
return 0
endfunction

//=============================================================================================
function LocalVars takes nothing returns gamecache
return InitGameCache("jasslocalvars.w3v")
endfunction

function SetHandleHandle takes handle subject, string name, handle value returns nothing
if value==null then
call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, HandleVars_GetInt(value) )
endif
endfunction

function SetHandleInt takes handle subject, string name, integer value returns nothing
if value==0 then
call FlushStoredInteger(LocalVars(),I2S(HandleVars_GetInt(subject)),name)
else
call StoreInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
endif
endfunction

function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
call FlushStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
else
call StoreReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name, value)
endif
endfunction

function GetHandleHandle takes handle subject, string name returns handle
return GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
return null
endfunction

function GetHandleInt takes handle subject, string name returns integer
return GetStoredInteger(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction

function GetHandleReal takes handle subject, string name returns real
return GetStoredReal(LocalVars(), I2S(HandleVars_GetInt(subject)), name)
endfunction

function FlushHandleLocals takes handle subject returns nothing
call FlushStoredMission(LocalVars(), I2S(HandleVars_GetInt(subject)) )
endfunction

function PylonCondition takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'hhou' )
endfunction

as u can c there is a PylonCondition function at the end here. this is wat is making problems. I seem2 keep getting 'expected a name' error on these 2 lines of coding

set udg_Pylon = FindPylon( GetOrderPointLoc(), GetOwningPlayer(GetOrderedUnit()), Condition(function PylonCondition) )

&

set udg_Pylon = FindPylon( GetUnitLoc(GetEnumUnit()), GetOwningPlayer(GetEnumUnit()), Condition(function PylonCondition) )

in the New Pylon & Destroy Pylon triggers. i have set all the unit raw codes 2 the same and it still seems 2 not work. i dunno y is there a variable i need 4 the PylonCondition? cuz there is no other coding relatd 2 these triggers.
#7
Yes there is a global variable used.
udg_Pylon
Thats a global variables.

You need to create a global variable called Pylon but I dont know the type it is.

I also cant find a function called FindPylon in your script it might be a WEU trigger or is customly made and is mising from your map.

Tip. You can only call functions that are above the function your calling from in the script file.