- Joined
- Jun 8, 2007
- Messages
- 97
Okay, i just recently took away all the bj's in my script, hopefully optimizing my script by a ton...or at least a little XD.
Before i started to mess with my script and take away bj's, it worked pretty darn well, now, it's kinda messed up.
I've worked, very deligintly, on these three scripts, and i'm only supremely satisfied with one of them, the sound one, which is the third and least-needed.
The one most needed on the script-help hotline, is the second multiboard one, it's so screwed up, syntax checker is fine, but it just looks horrible...
And the first function, well, it's fine also, but it just looks odd, no matter how i do it, whenever i test it the camera is always not right, the floating text pops up in wrong places...oh it's bad
First Trigger
Second Trigger
Third Trigger
Before i started to mess with my script and take away bj's, it worked pretty darn well, now, it's kinda messed up.
I've worked, very deligintly, on these three scripts, and i'm only supremely satisfied with one of them, the sound one, which is the third and least-needed.
The one most needed on the script-help hotline, is the second multiboard one, it's so screwed up, syntax checker is fine, but it just looks horrible...
And the first function, well, it's fine also, but it just looks odd, no matter how i do it, whenever i test it the camera is always not right, the floating text pops up in wrong places...oh it's bad
First Trigger
These functions are meant to initialize the quests, make all the players have an ally/share vision with the neutral force that controls the shops, start an introduction slideshow with all the credits, and it is meant to play a random sound from the sound and it centers everybodies cam on one spot for the credits, than moves first 4 players to their team's "Base, and second 4 to their team's "base"
147 lines of code, hopefully i took out all the unwanted bj calls
JASS:
function RandomSounds takes nothing returns nothing
local integer randomnum = GetRandomInt( 1, 17 )
call ClearMapMusic()
call StopMusic( false )
call StartSound( udg_RandomSounds[randomnum])
set udg_last = udg_RandomSounds[randomnum]
endfunction
function Credits takes nothing returns nothing
local integer PlyrNum = 0
local integer CamPlyrTeam = 1
local camerasetup Cam = gg_cam_Team1Start
local texttag aa
local texttag bb
local texttag cc
local texttag dd
local texttag ee
local texttag ff
local quest array questie
local questitem array questieitem
set questie[1] = CreateQuest()
set questieitem[1] = QuestCreateItem(questie[1])
set questie[2] = CreateQuest()
set questieitem[2] = QuestCreateItem(questie[2])
set questie[3] = CreateQuest()
set questie[4] = CreateQuest()
set udg_RandomSounds[1] = gg_snd_Funky_Drums_1
set udg_RandomSounds[2] = gg_snd_Funky_Drums_2
set udg_RandomSounds[3] = gg_snd_Funky_Drums_3
set udg_RandomSounds[4] = gg_snd_Funky_Drums_4
set udg_RandomSounds[5] = gg_snd_Latino_Drums_1
set udg_RandomSounds[6] = gg_snd_Latino_Drums_2
set udg_RandomSounds[7] = gg_snd_Latino_Drums_3
set udg_RandomSounds[8] = gg_snd_Latino_Drums_4
set udg_RandomSounds[9] = gg_snd_Poppin_Drums_1
set udg_RandomSounds[10] = gg_snd_Poppin_Drums_2
set udg_RandomSounds[11] = gg_snd_Poppin_Drums_3
set udg_RandomSounds[12] = gg_snd_Poppin_Drums_4
set udg_RandomSounds[13] = gg_snd_Rockin__Drums_1
set udg_RandomSounds[14] = gg_snd_Rockin__Drums_2
set udg_RandomSounds[15] = gg_snd_Rockin__Drums_3
set udg_RandomSounds[16] = gg_snd_Rockin__Drums_4
set udg_RandomSounds[17] = gg_snd_Drum_Arrangement_1
call RandomSounds()
call SetTerrainFogEx( 0, 0.00, 0.00, 0, 0.00, 0.00, 0.00 )
call SetSkyModel( null )
loop
exitwhen PlyrNum == 7
call SetPlayerAlliance( Player(PlyrNum), Player(11), ConvertAllianceType( 3 ), true )
set PlyrNum = PlyrNum+ 1
endloop
set PlyrNum = 0
call ShowInterfaceForceOff( GetPlayersAll(), 0.00 )
loop
exitwhen PlyrNum == 8
if GetLocalPlayer() == Player(PlyrNum) then
call CameraSetupApplyForceDuration( gg_cam_Intro, false, 0 )
endif
set PlyrNum = PlyrNum + 1
endloop
set PlyrNum = 0
set aa = CreateTextTag()
call SetTextTagPos( aa, GetLocationX( Location( -736, -704 )), GetLocationY( Location( -1056, -352 )), 0.00 )
call SetTextTagText( aa, "|Cffffcc00The Authors!|R|N|N|CFF005826FuryOfASquirrel|R |Cffffcc00and|R |CFF005B7FIrkie500!|R", TextTagSize2Height(15.00) )
call SetTextTagVelocity( aa, TextTagSpeed2Velocity(100) * Cos(90 * bj_DEGTORAD), TextTagSpeed2Velocity(100) * Sin(90 * bj_DEGTORAD) )
call TriggerSleepAction( 3.00 )
set bb = CreateTextTag()
call SetTextTagPos( bb, GetLocationX( Location( -736, -704 )), GetLocationY( Location( -736, -352 )), 0.00 )
call SetTextTagText( bb, "|Cffffcc00We used these tools ;|R", TextTagSize2Height(10.00) )
call SetTextTagVelocity( bb, TextTagSpeed2Velocity(100) * Cos(90 * bj_DEGTORAD), TextTagSpeed2Velocity(100) * Sin(90 * bj_DEGTORAD) )
call TriggerSleepAction( 1.00 )
set cc = CreateTextTag()
call SetTextTagPos( cc, GetLocationX( Location( -736, -704 )), GetLocationY( Location( -736, -352 )), 10.00 )
call SetTextTagText( cc, "|CFF790000World Editor Unlimited as a World Editor Add-On,|R", TextTagSize2Height(10.00) )
call SetTextTagVelocity( cc, TextTagSpeed2Velocity(100) * Cos(90 * bj_DEGTORAD), TextTagSpeed2Velocity(100) * Sin(90 * bj_DEGTORAD) )
call TriggerSleepAction( .80 )
set dd = CreateTextTag()
call SetTextTagPos( dd, GetLocationX( Location( -736, -704 )), GetLocationY( Location( -736, -352 )), 0.00 )
call SetTextTagText( dd, "|CFFF26522MAGIX Music Maker deLuxe 10 for custom drums!,|R", TextTagSize2Height(10.00) )
call SetTextTagVelocity( dd, TextTagSpeed2Velocity(100) * Cos(90 * bj_DEGTORAD), TextTagSpeed2Velocity(100) * Sin(90 * bj_DEGTORAD) )
call TriggerSleepAction( .80 )
set ee = CreateTextTag()
call SetTextTagPos( ee, GetLocationX( Location( -736, -704 )), GetLocationY( Location( -736, -352 )), 0.00 )
call SetTextTagText( ee, "|Cffffcc00And|R |CFFFF0000C|CFFFF3F00h|CFFFF7F00a|CFFFFFF00o|CFFC0FF00s |CFF40FF00S|CFF00FF00p|CFF00C03Fe|CFF00807Fc|CFF0000FFt|CFF3F20FFr|CFF7F40FFu|CFFBF60FFm|R |Cffffcc00for coloring texts!|R", TextTagSize2Height(10.00) )
call SetTextTagVelocity( ee, TextTagSpeed2Velocity(100) * Cos(90 * bj_DEGTORAD), TextTagSpeed2Velocity(100) * Sin(90 * bj_DEGTORAD) )
call TriggerSleepAction( 4.20 )
set ff = CreateTextTag()
call SetTextTagPos( ff, GetLocationX( Location( -736, -704 )), GetLocationY( Location( -736, -704 )), 0.00 )
call SetTextTagText( ff, "|CFF4A2800Have fun...in...|R|N|N|N |CFF086142A |CFF294521C|CFF393711T|CFF4A2800F|R|N |CFF005826By FuryOfASquirrel|R |CFF4A2800and|R |CFF005B7FIrkie500!|R|N|Cffffcc00(more about tools in quests)|R", TextTagSize2Height(15.00) )
call SetTextTagVelocity( ff, TextTagSpeed2Velocity(100) * Cos(90 * bj_DEGTORAD), TextTagSpeed2Velocity(100) * Sin(90 * bj_DEGTORAD) )
call TriggerSleepAction( 17.20 )
call SetTerrainFogEx( 0, 1000, 8000, 0, 0, 88, 38 )
loop
exitwhen PlyrNum == 8
if PlyrNum == 4 then
set Cam = gg_cam_Team2Start
endif
if GetLocalPlayer() == Player(PlyrNum) then
call CameraSetupApplyForceDuration( Cam, true, 1 )
endif
set PlyrNum = PlyrNum + 1
endloop
call TriggerSleepAction( 1.00 )
call DestroyTextTag(aa)
call DestroyTextTag(bb)
call DestroyTextTag(cc)
call DestroyTextTag(dd)
call DestroyTextTag(ee)
call DestroyTextTag(ff)
set aa = null
set bb = null
set cc = null
set dd = null
set ee = null
set ff = null
call QuestSetTitle( questie[1], "|CFF005826Real Name...")
call QuestSetDescription( questie[1], " ")
call QuestSetIconPath( questie[1], "ReplaceableTextures\\CommandButtons\\BTNScroll.blp")
call QuestSetRequired( questie[1], true)
call QuestItemSetDescription( questieitem[1], "|CFF005826Sean" )
call QuestSetTitle( questie[2], "|CFF005B7FReal Name...")
call QuestSetDescription( questie[2], " ")
call QuestSetIconPath( questie[2], "ReplaceableTextures\\CommandButtons\\BTNScroll.blp")
call QuestSetRequired( questie[2], false)
call QuestItemSetDescription( questieitem[2], "|CFF005B7FSteven" )
call QuestSetTitle( questie[3], "|CFF086142Credits")
call QuestSetDescription( questie[3], "|CFF790000T|CFF780001h|CFF770002a|CFF750103n|CFF740104k|CFF720105s |CFF6F0207l|CFF6E0308o|CFF6D0309t|CFF6B030As |CFF68040Ct|CFF67050Do |CFF64050Ft|CFF620610h|CFF610611e |CFF5E0713c|CFF5D0714o|CFF5B0815m|CFF5A0816m|CFF580817u|CFF570918n|CFF550919i|CFF540A1At|CFF530A1Bi|CFF510A1Ce|CFF500B1Ds |CFF4D0C1Fa|CFF4B0C20t |N|CFF490D23w|CFF470D24w|CFF460E25w|CFF440E26.|CFF430E27h|CFF410F28i|CFF400F29v|CFF3E0F2Ae|CFF3D102Bw|CFF3C102Co|CFF3A112Dr|CFF39112Ek|CFF37112Fs|CFF361230h|CFF341231o|CFF331332p|CFF311333.|CFF301334c|CFF2F1435o|CFF2D1436m |CFF2A1538a|CFF291539n|CFF27163Ad |N|CFF25173Cw|CFF23173Dw|CFF22173Ew|CFF20183F.|CFF1F1840t|CFF1D1841h|CFF1C1942e|CFF1A1943h|CFF191A45e|CFF181A46l|CFF161A47p|CFF151B48e|CFF131B49r|CFF121C4A.|CFF101C4Bn|CFF0F1C4Ce|CFF0D1D4Dt|CFF0C1D4E/|CFF0B1E4Ff|CFF091E50o|CFF081E51r|CFF061F52u|CFF051F53m|CFF031F54s|CFF012056.")
call QuestSetIconPath( questie[3], "ReplaceableTextures\\CommandButtons\\BTNHumanBuild.blp" )
call QuestSetRequired( questie[3], true)
call QuestSetTitle( questie[4], "|CFFFF0000T|CFFFFFF00o|CFF00FF00o|CFF00807Fl|CFF0000FFs")
call QuestSetDescription( questie[4], "The tools we used can be attained as such...|N |N|CFF790000World Editor Unlimited|R at http://www.wc3campaigns.net/tools/weu/|N |N|CFFFF0000C|CFFFF3F00h|CFFFF7F00a|CFFFFFF00o|CFFC0FF00s |CFF40FF00S|CFF00FF00p|CFF00C03Fe|CFF00807Fc|CFF0000FFt|CFF3F20FFr|CFF7F40FFu|CFFBF60FFm|R at [url]http://www.hiveworkshop.com/resources_new/tools/369/[/url] |N(go to [url]www.hiveworkshop.com[/url] under tools, you can search for Chaos Spectrum there)|N |NBut|N |NYou can only get |CFFF26522MAGIX Music Maker deLuxe 10|R from stores, it isn't free.")
call QuestSetIconPath( questie[4], "ReplaceableTextures\\CommandButtons\\BTNControlMagic.blp")
call QuestSetRequired( questie[4], false)
call ShowInterfaceForceOn( GetPlayersAll(), 0.00 )
set questie[1] = null
set questieitem[1] = null
set questie[2] = null
set questieitem[2] = null
set questie[3] = null
set questie[4] = null
set Cam = null
endfunction
function InitTrig_Intro takes nothing returns nothing
set gg_trg_Intro = CreateTrigger()
call TriggerAddAction( gg_trg_Intro, function Credits )
endfunction
Second Trigger
These functions are to make a multiboard, anything i could ever want in a CTF multiboard is right here, except for a D/C checker
65 lines of code if i took out all unwanted bj calls
JASS:
function CheckForPlayers takes nothing returns nothing
local multiboarditem plyrstat
local integer plyrnum = 0
loop
exitwhen plyrnum == 8
if GetPlayerSlotState(Player(plyrnum)) == PLAYER_SLOT_STATE_PLAYING then
set plyrnum = plyrnum + 1
elseif GetPlayerSlotState(Player(plyrnum)) == PLAYER_SLOT_STATE_EMPTY then
set plyrstat = MultiboardGetItem( udg_Main[1], 2, plyrnum + 2 )
call MultiboardSetItemValue( plyrstat, "|CFF005826-|CFF005832-|CFF00583FN|CFF00594Co|CFF005958t |CFF005A72P|CFF005B7Fl|CFF005B73a|CFF005B66y|CFF005A59i|CFF005A4Dn|CFF005940g|CFF005933-|CFF005927-" )
set plyrnum = plyrnum + 1
endif
endloop
set plyrstat = null
endfunction
function MultiboardAndQuests takes nothing returns nothing
local multiboarditem mainitem
set udg_Main[1] = CreateMultiboardBJ( 5, 9, "Team's Progress" )
set bj_lastCreatedMultiboard = null
set mainitem = MultiboardGetItem( udg_Main[1], 0, 0 )
call MultiboardSetItemStyle( mainitem, true, false )
call MultiboardReleaseItem( mainitem )
call MultiboardSetItemWidth( mainitem, 8.50 )
call MultiboardReleaseItem( mainitem )
set mainitem = MultiboardGetItem( udg_Main[1], 3, 1 )
call MultiboardSetItemValue( mainitem, "|CFFFFCC00Total|R |CFF086142N|CFF135837e|CFF1E4E2Cu|CFF294521t|CFF343B16r|CFF3F320Ba|CFF4A2800l|R |CFF707070Flags|R " )
call MultiboardSetItemWidth( mainitem, 11.00 )
set mainitem = MultiboardGetItem( udg_Main[1], 4, 1 )
call MultiboardSetItemValue( mainitem, "|CFFFF0000Kills|R" )
set mainitem = MultiboardGetItem( udg_Main[1], 5, 1 )
call MultiboardSetItemValue( mainitem, "|CFF707070Status|R" )
set mainitem = MultiboardGetItem( udg_Main[1], 1, 2 )
call MultiboardSetItemValue( mainitem, "|CFF790000T|CFF8A0E04e|CFF9B1C09a|CFFAC2B0Em |CFFCF4818O|CFFE0561Dn|CFFF16421e" )
set mainitem = MultiboardGetItem( udg_Main[1], 2, 2 )
call MultiboardSetItemValue( mainitem, "|CFFFF0000Red" )
set mainitem = MultiboardGetItem( udg_Main[1], 2, 3 )
call MultiboardSetItemValue( mainitem, "|CFF0000FFBlue" )
set mainitem = MultiboardGetItem( udg_Main[1], 2, 4 )
call MultiboardSetItemValue( mainitem, "|CFF18E7BDTeal" )
set mainitem = MultiboardGetItem( udg_Main[1], 2, 5 )
call MultiboardSetItemValue( mainitem, "|CFF520084Purple" )
set mainitem = MultiboardGetItem( udg_Main[1], 1, 6 )
call MultiboardSetItemValue( mainitem, "|CFF827B00T|CFF707C00e|CFF5D7D00a|CFF4B7E00m |CFF268100T|CFF138200w|CFF018300o" )
set mainitem = MultiboardGetItem( udg_Main[1], 2, 6 )
call MultiboardSetItemValue( mainitem, "|CFFFFFF00Yellow" )
set mainitem = MultiboardGetItem( udg_Main[1], 2, 7 )
call MultiboardSetItemValue( mainitem, "|CFFFF8A08Orange" )
set mainitem = MultiboardGetItem( udg_Main[1], 2, 8 )
call MultiboardSetItemValue( mainitem, "|CFF18BE00Green" )
set mainitem = MultiboardGetItem( udg_Main[1], 2, 9 )
call MultiboardSetItemValue( mainitem, "|CFFE759ADPink" )
set mainitem = MultiboardGetItem( udg_Main[1], 1, 1 )
call MultiboardSetItemValue( mainitem, "|CFF4F31B1R|CFF63E77Ca|CFF7EBEB6n|CFF9994F0d|CFF4493A3o|CFF776FC1m" )
call CheckForPlayers()
call MultiboardMinimize( udg_Main[1], true )
set mainitem = null
endfunction
//===========================================================================
function InitTrig_Multiboard takes nothing returns nothing
set gg_trg_Multiboard = CreateTrigger()
call TriggerRegisterTimerEvent( gg_trg_Multiboard, 0.05, false )
call TriggerAddAction( gg_trg_Multiboard, function MultiboardAndQuests )
endfunction
Third Trigger
This one is practically perfect, it does what it's supposed to do, and after i added the waits in, it did it so smooth i could barely notice it in-game, it's an awesome trigger!
153 Lines of Code
JASS:
function integerreturn takes nothing returns integer
if ( GetItemTypeId(GetManipulatedItem() ) ) == 'I000' then
return 1
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I001' then
return 2
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I002' then
return 3
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I003' then
return 4
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I007' then
return 5
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00A' then
return 6
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I005' then
return 7
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I006' then
return 8
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I009' then
return 9
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00E' then
return 10
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I008' then
return 11
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00F' then
return 12
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I004' then
return 13
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00G' then
return 14
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00D' then
return 15
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00C' then
return 16
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00B' then
return 17
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00I' then
return 18
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00J' then
return 19
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00K' then
return 20
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00L' then
return 21
elseif ( GetItemTypeId(GetManipulatedItem() ) ) == 'I00H' then
return 22
endif
return 0
endfunction
function Sounds takes nothing returns nothing
local integer randomnum
local multiboarditem mainitem = MultiboardGetItem( udg_Main[1], 1, 1 )
local string array soundname
set soundname[1] = "|CFFF26522Pop1"
set soundname[2] = "|CFFF26522Pop2"
set soundname[3] = "|CFFF26522Pop3"
set soundname[4] = "|CFFF26522Pop4"
set soundname[5] = "|CFF008400Lat1"
set soundname[6] = "|CFF008400Lat2"
set soundname[7] = "|CFF008400Lat3"
set soundname[8] = "|CFF008400Lat4"
set soundname[9] = "|CFFFFF200Funk1"
set soundname[10] = "|CFFFFF200Funk2"
set soundname[11] = "|CFFFFF200Funk3"
set soundname[12] = "|CFFFFF200Funk4"
set soundname[13] = "|CFFED1C24Rock1"
set soundname[14] = "|CFFED1C24Rock2"
set soundname[15] = "|CFFED1C24Rock3"
set soundname[16] = "|CFFED1C24Rock4"
set soundname[17] = "|CFFFFCC00Arrang1"
if GetBooleanAnd( integerreturn() > 0 , integerreturn() < 18 ) then
call TriggerSleepAction( .1 )
call ClearMapMusic()
call TriggerSleepAction( .1 )
call StopSound( udg_last, false, false )
call TriggerSleepAction( .1 )
call StopMusic( false )
call TriggerSleepAction( .1 )
call StartSound( udg_RandomSounds[integerreturn()] )
set udg_last = udg_RandomSounds[integerreturn()]
call MultiboardSetItemValue( mainitem, soundname[integerreturn()] )
elseif integerreturn() == 18 then
call TriggerSleepAction( .1 )
call ClearMapMusic()
call TriggerSleepAction( .1 )
call StopSound( udg_last, false, false )
call TriggerSleepAction( .1 )
call StopMusic( false )
call TriggerSleepAction( .1 )
set randomnum = (GetRandomInt(5, 8))
call StartSound( udg_RandomSounds[randomnum] )
set udg_last = udg_RandomSounds[randomnum]
call MultiboardSetItemValue( mainitem, "|CFF008400Random" )
elseif integerreturn() == 19 then
call TriggerSleepAction( .1 )
call ClearMapMusic()
call TriggerSleepAction( .1 )
call StopSound( udg_last, false, false )
call TriggerSleepAction( .1 )
call StopMusic( false )
call TriggerSleepAction( .1 )
set randomnum = (GetRandomInt(14, 16))
call StartSound( udg_RandomSounds[randomnum] )
set udg_last = udg_RandomSounds[randomnum]
call MultiboardSetItemValue( mainitem, "|CFFED1C24Random" )
elseif integerreturn() == 20 then
call TriggerSleepAction( .1 )
call ClearMapMusic()
call TriggerSleepAction( .1 )
call StopSound( udg_last, false, false )
call TriggerSleepAction( .1 )
call StopMusic( false )
call TriggerSleepAction( .1 )
set randomnum = (GetRandomInt(1, 4))
call StartSound( udg_RandomSounds[randomnum] )
set udg_last = udg_RandomSounds[randomnum]
call MultiboardSetItemValue( mainitem, "|CFFF26522Random" )
elseif integerreturn() == 21 then
call TriggerSleepAction( .1 )
call ClearMapMusic()
call TriggerSleepAction( .1 )
call StopSound( udg_last, false, false )
call TriggerSleepAction( .1 )
call StopMusic( false )
call TriggerSleepAction( .1 )
set randomnum = (GetRandomInt(9, 12))
call StartSound( udg_RandomSounds[randomnum] )
set udg_last = udg_RandomSounds[randomnum]
call MultiboardSetItemValue( mainitem, "|CFFFFF200Random" )
elseif integerreturn() == 22 then
call TriggerSleepAction( .1 )
call ClearMapMusic()
call TriggerSleepAction( .1 )
call StopSound( udg_last, false, false )
call TriggerSleepAction( .1 )
call StopMusic( false )
call TriggerSleepAction( .1 )
set randomnum = (GetRandomInt(1, 17))
call StartSound( udg_RandomSounds[randomnum] )
set udg_last = udg_RandomSounds[randomnum]
call MultiboardSetItemValue( mainitem, "|CFF4F31B1R|CFF63E77Ca|CFF7EBEB6n|CFF9994F0d|CFF4493A3o|CFF776FC1m" )
else
endif
set mainitem = null
endfunction
function InitTrig_Sounds takes nothing returns nothing
local integer index = 0
set gg_trg_Sounds = CreateTrigger()
loop
exitwhen index == bj_MAX_PLAYER_SLOTS
call TriggerRegisterPlayerUnitEvent( gg_trg_Sounds, Player(index), EVENT_PLAYER_UNIT_PICKUP_ITEM, null )
set index = index + 1
endloop
call TriggerAddAction( gg_trg_Sounds, function Sounds )
endfunction