update:
oh thankyou for replay...uhmm....yeah so i've read about 10 plus tutorials or so. i don't understand alot of it...but i understand alot more than when i made this new thread...
i have a few other questions now. you can ignore those others that i had.
apparently gui is really bad so i want to use only jass but alot of jass i don't understand just yet.
how do you use jasscraft? is there a tutorial for that somewhere? i don't understand using jasscraft at all.
what is the taking and returning all about?
like
function takes something returns something
i understand how to put information in there i'm just trying to figure out what that's for.
like for example you type in group unitgroupname or rect regionname, stuff like that...right? uhm but then what are those used for.
further, could anyone help me with a few of my triggers? in my tag map my runners die and get rescued alot, and i am pretty sure most of my memory leaks that haven't been fixed are in my runner dying and runner being rescued triggers.
so i converted from gui to custom text/jass and then i did some more editing but it looks like i can probably do some more? is what i can do more related to the taking and returning?
look how incredibly long this trigger is (and while we're on the subject, how do you do that scrolling box thing in the post? maybe i should edit the post and give it one?)...let me sum it up.
the first part is setting an integer global variable...it's the current points of the demon hunter making the kill...this trigger gives the points to the demon hunter from the runner kill, another gives them points for killing those buildings, well after that there is an attempt to kill certain types of units owned by the runner that died. everything works just fine...i guess...i'm not too incredibly sure if the points for the runner are kept track of properly, but that's not a big deal...maybe.
anyway as you can see this is a huge mass of text and if anyone wants to show me how to make it alot simpler and smaller and leak free i'm sure i would learn alot, and i would be very grateful.
one thing that was on my mind currently is if you notice down where it's trying to get rid of units...it has this funny command:
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func014Func008002 )
that b of course is the group name, at any rate...it says "Func008002", and the other commands are like that too, except for that part, now that was from converting from gui to jass, right? but when i went to add the udg_structures[17] i used the Func008002 from the udg_structures[4]. and i got no errors, and i tested it in map and the udg_structures[17] works fine, i'm just wondering if that means that the Func008002 can be used for all of those...
edit: i thought someting looked funny, i also noticed that the Func014 part was different too, i actually used Func015, and there was Func012 and those other numbers amongst all that too...i'm STARTING to WONDER if when i was testing it, something seemed a little fishy...did all of a sudden a bunch of the units disappear while i was waiting for one at a time? they had the wander ability and were flying around so it was hard to tell how many there were, but by the time i got down to killing 7 and 8 of the runners, i know it was working right, it seems that with the if boolean functions that possibly those flying units got cut only after i killed that one particular runner that corresponded with the Func015Func008002...is that right?
anyway, hopefully the above paragraph will show you i'm a thinker so i'll probably understand every change you make if you know of alot of good ones you can make, and give a brief explanation if possible.
i'm pretty sure there are going to be alot of changes needed, so if you can only make a few, i'll take whatever i can get, obviously i don't need you to do all the work for me, just pick out examples(from my trigger), and explain what you want me to do and i can do it myself.
function Trig_Runner_dies_Copy_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == udg_structures[0] ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == udg_structures[1] ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == udg_structures[2] ) ) then
return true
endif
return false
endfunction
function Trig_Runner_dies_Copy_Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == udg_players[0] ) ) then
return false
endif
if ( not Trig_Runner_dies_Copy_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func002Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == udg_structures[0] ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == udg_structures[1] ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == udg_structures[2] ) ) then
return true
endif
return false
endfunction
function Trig_Runner_dies_Copy_Func002C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == udg_players[1] ) ) then
return false
endif
if ( not Trig_Runner_dies_Copy_Func002Func003C() ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func003Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == udg_structures[0] ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == udg_structures[1] ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == udg_structures[2] ) ) then
return true
endif
return false
endfunction
function Trig_Runner_dies_Copy_Func003C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == udg_players[10] ) ) then
return false
endif
if ( not Trig_Runner_dies_Copy_Func003Func003C() ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == udg_players[0] ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func005C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == udg_players[1] ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func006C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == udg_players[10] ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func007Func005002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func007Func008002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func007Func011002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func007Func014002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func007Func017002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func007C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == udg_players[2] ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func008Func005002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func008Func008002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func008Func011002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func008Func014002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func008Func017002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func008C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == udg_players[3] ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func009Func005002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func009Func008002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func009Func011002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func009Func014002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func009Func017002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func009C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == udg_players[4] ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func010Func005002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func010Func008002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func010Func011002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func010Func014002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func010Func017002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func010C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == udg_players[5] ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func011Func005002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func011Func008002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func011Func011002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func011Func014002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func011Func017002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func011C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == udg_players[6] ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func012Func005002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func012Func008002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func012Func011002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func012Func014002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func012Func017002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func012C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == udg_players[7] ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func013Func005002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func013Func008002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func013Func011002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func013Func014002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func013Func017002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func013C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == udg_players[8] ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func014Func005002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func014Func008002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func014Func011002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func014Func014002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func014Func017002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func014C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == udg_players[9] ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Func015Func005002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func015Func008002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func015Func011002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func015Func014002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func015Func017002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Runner_dies_Copy_Func015C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == udg_players[11] ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SAPPER) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Runner_dies_Copy_Actions takes nothing returns nothing
local location a
local group b
if ( Trig_Runner_dies_Copy_Func001C() ) then
set udg_integerpoints[0] = GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]))
else
endif
if ( Trig_Runner_dies_Copy_Func002C() ) then
set udg_integerpoints[1] = GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]))
else
endif
if ( Trig_Runner_dies_Copy_Func003C() ) then
set udg_integerpoints[2] = GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]))
else
endif
if ( Trig_Runner_dies_Copy_Func004C() ) then
set udg_integerpoints[0] = GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]))
else
endif
if ( Trig_Runner_dies_Copy_Func005C() ) then
set udg_integerpoints[1] = GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]))
else
endif
if ( Trig_Runner_dies_Copy_Func006C() ) then
set udg_integerpoints[2] = GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]))
else
endif
if ( Trig_Runner_dies_Copy_Func007C() ) then
set a=GetRandomLocInRect(udg_regions[10])
call CreateNUnitsAtLoc( 1, udg_critters[0], udg_players[12], a, bj_UNIT_FACING )
call RemoveLocation(a)
set a = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[3])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func007Func005002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[4])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func007Func008002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[5])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func007Func011002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[6])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func007Func014002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[7])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func007Func017002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[17])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func008002 )
call DestroyGroup(b)
set b = null
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
call SetItemCharges( GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12])) + 1 ) )
call DisplayTextToForce( GetPlayersAll(), udg_texts[3] )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 4, "ReplaceableTextures\\CommandButtons\\BTNAlbatross.blp" )
call SetPlayerName( GetOwningPlayer(GetTriggerUnit()), udg_texts[21] )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 4, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) )
else
endif
if ( Trig_Runner_dies_Copy_Func008C() ) then
set a=GetRandomLocInRect(udg_regions[10])
call CreateNUnitsAtLoc( 1, udg_critters[1], udg_players[12], a, bj_UNIT_FACING )
call RemoveLocation(a)
set a = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[3])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func008Func005002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[4])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func008Func008002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[5])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func008Func011002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[6])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func008Func014002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[7])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func008Func017002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[17])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func008002 )
call DestroyGroup(b)
set b = null
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
call SetItemCharges( GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12])) + 1 ) )
call DisplayTextToForce( GetPlayersAll(), udg_texts[3] )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 5, "ReplaceableTextures\\CommandButtons\\BTNCritterChicken.blp" )
call SetPlayerName( GetOwningPlayer(GetTriggerUnit()), udg_texts[22] )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 5, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) )
else
endif
if ( Trig_Runner_dies_Copy_Func009C() ) then
set a=GetRandomLocInRect(udg_regions[10])
call CreateNUnitsAtLoc( 1, udg_critters[2], udg_players[12], a, bj_UNIT_FACING )
call RemoveLocation(a)
set a = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[3])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func009Func005002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[4])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func009Func008002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[5])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func009Func011002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[6])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func009Func014002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[7])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func009Func017002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[17])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func008002 )
call DestroyGroup(b)
set b = null
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
call SetItemCharges( GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12])) + 1 ) )
call DisplayTextToForce( GetPlayersAll(), udg_texts[3] )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 6, "ReplaceableTextures\\CommandButtons\\BTNSpinyCrab.blp" )
call SetPlayerName( GetOwningPlayer(GetTriggerUnit()), udg_texts[23] )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 6, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) )
else
endif
if ( Trig_Runner_dies_Copy_Func010C() ) then
set a=GetRandomLocInRect(udg_regions[10])
call CreateNUnitsAtLoc( 1, udg_critters[3], udg_players[12], a, bj_UNIT_FACING )
call RemoveLocation(a)
set a = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[3])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func010Func005002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[4])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func010Func008002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[5])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func010Func011002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[6])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func010Func014002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[7])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func010Func017002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[17])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func008002 )
call DestroyGroup(b)
set b = null
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
call SetItemCharges( GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12])) + 1 ) )
call DisplayTextToForce( GetPlayersAll(), udg_texts[3] )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 7, "ReplaceableTextures\\CommandButtons\\BTNWolf.blp" )
call SetPlayerName( GetOwningPlayer(GetTriggerUnit()), udg_texts[24] )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 7, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) )
else
endif
if ( Trig_Runner_dies_Copy_Func011C() ) then
set a=GetRandomLocInRect(udg_regions[10])
call CreateNUnitsAtLoc( 1, udg_critters[4], udg_players[12], a, bj_UNIT_FACING )
call RemoveLocation(a)
set a = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[3])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func011Func005002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[4])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func011Func008002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[5])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func011Func011002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[6])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func011Func014002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[7])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func011Func017002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[17])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func008002 )
call DestroyGroup(b)
set b = null
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
call SetItemCharges( GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12])) + 1 ) )
call DisplayTextToForce( GetPlayersAll(), udg_texts[3] )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 8, "ReplaceableTextures\\CommandButtons\\BTNDuneWorm.blp" )
call SetPlayerName( GetOwningPlayer(GetTriggerUnit()), udg_texts[25] )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 8, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) )
else
endif
if ( Trig_Runner_dies_Copy_Func012C() ) then
set a=GetRandomLocInRect(udg_regions[10])
call CreateNUnitsAtLoc( 1, udg_critters[5], udg_players[12], a, bj_UNIT_FACING )
call RemoveLocation(a)
set a = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[3])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func012Func005002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[4])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func012Func008002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[5])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func012Func011002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[6])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func012Func014002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[7])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func012Func017002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[17])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func008002 )
call DestroyGroup(b)
set b = null
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
call SetItemCharges( GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12])) + 1 ) )
call DisplayTextToForce( GetPlayersAll(), udg_texts[3] )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 9, "ReplaceableTextures\\CommandButtons\\BTNFelBoar.blp" )
call SetPlayerName( GetOwningPlayer(GetTriggerUnit()), udg_texts[26] )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 9, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) )
else
endif
if ( Trig_Runner_dies_Copy_Func013C() ) then
set a=GetRandomLocInRect(udg_regions[10])
call CreateNUnitsAtLoc( 1, udg_critters[6], udg_players[12], a, bj_UNIT_FACING )
call RemoveLocation(a)
set a = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[3])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func013Func005002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[4])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func013Func008002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[5])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func013Func011002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[6])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func013Func014002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[7])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func013Func017002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[17])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func008002 )
call DestroyGroup(b)
set b = null
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
call SetItemCharges( GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12])) + 1 ) )
call DisplayTextToForce( GetPlayersAll(), udg_texts[3] )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 10, "ReplaceableTextures\\CommandButtons\\BTNHex.blp" )
call SetPlayerName( GetOwningPlayer(GetTriggerUnit()), udg_texts[27] )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 10, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) )
else
endif
if ( Trig_Runner_dies_Copy_Func014C() ) then
set a=GetRandomLocInRect(udg_regions[10])
call CreateNUnitsAtLoc( 1, udg_critters[7], udg_players[12], a, bj_UNIT_FACING )
call RemoveLocation(a)
set a = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[3])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func014Func005002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[4])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func014Func008002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[5])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func014Func011002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[6])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func014Func014002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[7])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func014Func017002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[17])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func008002 )
call DestroyGroup(b)
set b = null
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
call SetItemCharges( GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12])) + 1 ) )
call DisplayTextToForce( GetPlayersAll(), udg_texts[3] )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 11, "ReplaceableTextures\\CommandButtons\\BTNCritterRabbit.blp" )
call SetPlayerName( GetOwningPlayer(GetTriggerUnit()), udg_texts[28] )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 11, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) )
else
endif
if ( Trig_Runner_dies_Copy_Func015C() ) then
set a=GetRandomLocInRect(udg_regions[10])
call CreateNUnitsAtLoc( 1, udg_critters[8], udg_players[12], a, bj_UNIT_FACING )
call RemoveLocation(a)
set a = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[3])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func005002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[4])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func008002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[5])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func011002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[6])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func014002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[7])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func017002 )
call DestroyGroup(b)
set b = null
set b=GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), udg_structures[17])
call ForGroupBJ( b, function Trig_Runner_dies_Copy_Func015Func008002 )
call DestroyGroup(b)
set b = null
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_LUMBER )
call SetItemCharges( GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12]), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetKillingUnitBJ(), udg_item_Copy[12])) + 1 ) )
call DisplayTextToForce( GetPlayersAll(), udg_texts[3] )
call MultiboardSetItemIconBJ( GetLastCreatedMultiboard(), 1, 12, "ReplaceableTextures\\CommandButtons\\BTNRacoon.blp" )
call SetPlayerName( GetOwningPlayer(GetTriggerUnit()), udg_texts[29] )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 12, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) )
else
endif
endfunction
//===========================================================================
function InitTrig_Runner_dies_jass takes nothing returns nothing
set gg_trg_Runner_dies_jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Runner_dies_jass, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Runner_dies_jass, function Trig_Runner_dies_Copy_Actions )
endfunction