| 07-31-2002, 02:00 AM | #1 |
Guest | Well, I posted this on the Bnet forums, but I can't copy and paste my map script there for some reason, so I figure it'd be better here. Ok, I've been making a map, and have some significant progress on it. BUT, I just tried saving it about an hour ago (never had any problems before), and I got THOUSANDS of compile errors, all referencing my triggers. The triggers looked perfectly fine; there's no reason for it to do this. I even converted them all to script, and there's NOTHING wrong with it. It's disabled all my triggers, and I can't enable them again. Anyone know what's with this? Like I said, there's NOTHING wrong with my triggers, but here goes: ----BEGIN SCRIPT---- globals // User-defined timer udg_NaturesWrathEffectTimer = null effect udg_NaturesWrathEffect = null timer udg_NaturesWrathRecharge = null unit udg_CastingUnit = null integer array udg_Mana leaderboard udg_ManaBoard = null integer array udg_Kills leaderboard udg_KillsBoard = null boolean udg_ManaBoardOn boolean udg_KillBoardOn // Generated rect gg_rct_WhiteBase = null rect gg_rct_BlueBase1 = null rect gg_rct_BlueBase2 = null rect gg_rct_BlueBase3 = null sound gg_snd_ChimaeraAlternateMissileHit1 = null sound gg_snd_SentinelNoEnergy1 = null trigger gg_trg_ManaBoardInit = null trigger gg_trg_KillBoardFirstSwitch = null trigger gg_trg_SwitchBoardMana = null trigger gg_trg_SwitchBoardKills = null trigger gg_trg_KillTracker = null trigger gg_trg_Daytime = null trigger gg_trg_Debuggin_Resources = null trigger gg_trg_WhiteBaseSnow = null trigger gg_trg_BlueBaseRain = null trigger gg_trg_NaturesWrathManaCheck = null trigger gg_trg_NaturesWrath = null trigger gg_trg_NaturesWrathNoMana = null trigger gg_trg_NaturesWrath2 = null trigger gg_trg_NaturesWrathEnd = null trigger gg_trg_NaturesWrathRecharge = null endglobals function InitGlobals takes nothing returns nothing set udg_NaturesWrathEffectTimer = CreateTimer() set udg_NaturesWrathRecharge = CreateTimer() set udg_ManaBoardOn = false set udg_KillBoardOn = false endfunction //*************************************************************************** //* //* Sounds //* //*************************************************************************** function InitSounds takes nothing returns nothing set gg_snd_ChimaeraAlternateMissileHit1 = CreateSound( "Abilities\\Weapons\\ChimaeraAcidMissile\\ChimaeraAlternateMissileHit1.wav", false, true, true, 10, 10, "AcidsEAX" ) call SetSoundParamsFromLabel( gg_snd_ChimaeraAlternateMissileHit1, "ChimaeraAcidHit" ) call SetSoundDuration( gg_snd_ChimaeraAlternateMissileHit1, 736 ) set gg_snd_SentinelNoEnergy1 = CreateSound( "Sound\\Interface\\Warning\\NightElf\\SentinelNoEnergy1.wav", false, false, false, 10, 10, "DefaultEAXON" ) call SetSoundParamsFromLabel( gg_snd_SentinelNoEnergy1, "NoManaNightElf" ) call SetSoundDuration( gg_snd_SentinelNoEnergy1, 1559 ) call SetSoundChannel( gg_snd_SentinelNoEnergy1, 6 ) endfunction //*************************************************************************** //* //* Unit Creation //* //*************************************************************************** //=========================================================================== function CreateBuildingsForPlayer0 takes nothing returns nothing local player p = Player(0) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'htow', -384.0, 2176.0, 270.000 ) endfunction //=========================================================================== function CreateUnitsForPlayer0 takes nothing returns nothing local player p = Player(0) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'hC06', -376.0, 113.7, 162.625 ) set u = CreateUnit( p, 'hC06', -230.6, 307.7, 228.402 ) set u = CreateUnit( p, 'hC06', 123.6, -49.9, 90.058 ) set u = CreateUnit( p, 'hC06', 172.2, 410.2, 355.737 ) set u = CreateUnit( p, 'hC06', 50.2, 422.3, 4.252 ) set u = CreateUnit( p, 'hC06', -14.1, 170.3, 17.425 ) set u = CreateUnit( p, 'hC05', -645.1, 134.7, 98.935 ) set u = CreateUnit( p, 'hC05', -551.2, -40.3, 10.998 ) set u = CreateUnit( p, 'hC05', -549.3, -37.1, 199.727 ) set u = CreateUnit( p, 'hC05', -535.6, 232.2, 31.191 ) set u = CreateUnit( p, 'hC05', -549.6, 254.6, 172.106 ) set u = CreateUnit( p, 'hC05', -650.3, 177.5, 211.175 ) set u = CreateUnit( p, 'hC05', -507.2, -4.6, 336.807 ) set u = CreateUnit( p, 'hC05', -711.9, -4.6, 140.157 ) set u = CreateUnit( p, 'hC01', 299.2, 166.7, 162.636 ) set u = CreateUnit( p, 'hC01', 289.5, 134.7, 94.661 ) set u = CreateUnit( p, 'hC01', 267.2, 103.3, 172.062 ) set u = CreateUnit( p, 'hC01', 153.6, 319.3, 165.360 ) set u = CreateUnit( p, 'hC01', 318.7, 402.1, 34.971 ) set u = CreateUnit( p, 'hC01', 442.6, 277.2, 170.579 ) set u = CreateUnit( p, 'hC01', 453.0, 62.1, 93.606 ) set u = CreateUnit( p, 'hC01', 343.7, -7.9, 175.918 ) set u = CreateUnit( p, 'nC07', -157.3, 676.8, 2.780 ) set u = CreateUnit( p, 'nC07', -137.1, 560.9, 84.136 ) set u = CreateUnit( p, 'nC07', -415.6, 484.2, 4.922 ) set u = CreateUnit( p, 'nC07', -453.1, 513.7, 268.481 ) set u = CreateUnit( p, 'nC07', -398.5, 217.5, 338.895 ) set u = CreateUnit( p, 'nC07', -250.7, 221.2, 343.212 ) set u = CreateUnit( p, 'nC07', -93.5, 471.7, 83.740 ) set u = CreateUnit( p, 'eC04', -727.7, -298.1, 272.843 ) set u = CreateUnit( p, 'eC04', -547.9, -396.4, 155.220 ) set u = CreateUnit( p, 'eC04', -557.4, -266.0, 218.030 ) set u = CreateUnit( p, 'nC02', -170.0, -261.6, 16.491 ) set u = CreateUnit( p, 'nC02', -287.6, -356.2, 38.860 ) set u = CreateUnit( p, 'nC02', -47.5, -408.2, 222.139 ) set u = CreateUnit( p, 'nC03', 417.3, -226.5, 349.662 ) set u = CreateUnit( p, 'nC03', 328.4, -368.4, 277.336 ) set u = CreateUnit( p, 'nC03', 239.3, -360.3, 180.016 ) set u = CreateUnit( p, 'nC00', -984.6, 423.7, 97.825 ) set u = CreateUnit( p, 'nC00', -879.5, 651.5, 98.001 ) set u = CreateUnit( p, 'nC00', -689.1, 276.8, 260.516 ) set u = CreateUnit( p, 'nC00', -861.6, 328.6, 24.940 ) set u = CreateUnit( p, 'nhea', 177.9, 737.5, 106.735 ) set u = CreateUnit( p, 'nhea', 95.9, 593.7, 33.136 ) set u = CreateUnit( p, 'nhea', 22.0, 749.0, 32.542 ) set u = CreateUnit( p, 'nhea', -113.9, 967.8, 301.595 ) set u = CreateUnit( p, 'nhea', -92.6, 681.0, 176.413 ) set u = CreateUnit( p, 'nsth', 173.3, -700.6, 37.816 ) set u = CreateUnit( p, 'nsth', 270.0, -565.3, 226.084 ) set u = CreateUnit( p, 'nsth', 468.3, -360.8, 17.941 ) set u = CreateUnit( p, 'nsth', 634.9, -32.3, 10.624 ) set u = CreateUnit( p, 'eC09', -891.7, -807.3, 152.055 ) set u = CreateUnit( p, 'eC09', -372.2, -1192.7, 221.766 ) set u = CreateUnit( p, 'EC11', 10.9, -1015.2, 255.570 ) set u = CreateUnit( p, 'hC08', -646.2, -915.5, 248.650 ) set u = CreateUnit( p, 'hC08', -328.6, -765.5, 176.446 ) set u = CreateUnit( p, 'hC08', -258.1, -982.8, 260.120 ) set u = CreateUnit( p, 'hC08', -500.1, -834.6, 261.516 ) set u = CreateUnit( p, 'hC08', -658.8, -563.0, 172.073 ) set u = CreateUnit( p, 'nC12', -496.3, -1003.8, 0.242 ) set u = CreateUnit( p, 'nC12', -674.8, -800.5, 290.531 ) set u = CreateUnit( p, 'nC12', -615.8, -1130.0, 55.856 ) set u = CreateUnit( p, 'nC12', -797.2, -987.5, 112.514 ) set u = CreateUnit( p, 'nC12', -539.0, -1339.1, 111.042 ) set u = CreateUnit( p, 'nC13', -223.8, -1177.8, 243.728 ) set u = CreateUnit( p, 'nC13', -744.3, -1210.1, 169.272 ) set u = CreateUnit( p, 'nC13', -801.0, -1062.8, 337.840 ) set u = CreateUnit( p, 'nC13', -382.7, -1360.6, 24.808 ) set u = CreateUnit( p, 'eC14', 140.4, -1326.0, 331.742 ) set u = CreateUnit( p, 'eC14', 345.8, -1239.4, 309.428 ) set u = CreateUnit( p, 'eC14', 121.6, -1504.6, 319.261 ) set u = CreateUnit( p, 'eC14', -74.5, -1405.8, 345.684 ) set u = CreateUnit( p, 'eC15', 270.4, -1067.9, 200.375 ) set u = CreateUnit( p, 'eC15', 344.6, -1383.9, 222.227 ) set u = CreateUnit( p, 'eC15', -54.8, -1188.0, 285.961 ) set u = CreateUnit( p, 'eC15', -148.5, -881.1, 164.514 ) set u = CreateUnit( p, 'eC15', 499.5, -1244.0, 264.042 ) set u = CreateUnit( p, 'nC16', -366.9, -1214.1, 276.216 ) set u = CreateUnit( p, 'nC16', -77.5, -1285.0, 230.797 ) set u = CreateUnit( p, 'nC16', 110.4, -1199.7, 74.083 ) set u = CreateUnit( p, 'hC17', -355.6, -1482.2, 25.214 ) set u = CreateUnit( p, 'hC17', -576.2, -1501.0, 55.076 ) set u = CreateUnit( p, 'hC17', -741.9, -1381.7, 55.680 ) set u = CreateUnit( p, 'hC17', -917.7, -1122.8, 313.318 ) set u = CreateUnit( p, 'uC19', 621.7, -891.0, 52.143 ) set u = CreateUnit( p, 'uC19', 750.8, -549.2, 295.585 ) set u = CreateUnit( p, 'uC19', 815.1, -226.4, 31.499 ) set u = CreateUnit( p, 'nC20', 791.4, -1179.9, 222.304 ) set u = CreateUnit( p, 'nC20', 916.0, -871.7, 304.056 ) set u = CreateUnit( p, 'nC20', 939.4, -606.2, 21.446 ) endfunction //=========================================================================== function CreateUnitsForPlayer1 takes nothing returns nothing local player p = Player(1) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'hpea', -2316.2, 585.2, 92.640 ) set u = CreateUnit( p, 'hpea', -2336.0, 250.1, 254.737 ) set u = CreateUnit( p, 'hpea', -2301.1, -38.1, 82.114 ) set u = CreateUnit( p, 'hpea', -2295.5, -43.7, 330.523 ) set u = CreateUnit( p, 'hpea', -2089.1, -192.2, 268.712 ) set u = CreateUnit( p, 'hpea', -2073.1, -186.8, 300.892 ) set u = CreateUnit( p, 'hpea', -2154.0, 324.7, 166.602 ) set u = CreateUnit( p, 'hpea', -2162.1, 368.9, 57.548 ) set u = CreateUnit( p, 'hpea', -2163.3, 375.2, 291.498 ) set u = CreateUnit( p, 'hpea', -1906.6, 299.6, 278.940 ) set u = CreateUnit( p, 'hpea', -2002.4, 213.5, 271.129 ) set u = CreateUnit( p, 'hpea', -2082.0, 76.6, 93.507 ) endfunction //=========================================================================== function CreateNeutralPassiveBuildings takes nothing returns nothing local player p = Player(PLAYER_NEUTRAL_PASSIVE) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'ncp3', 4224.0, 768.0, 270.000 ) set u = CreateUnit( p, 'ncp3', 384.0, 3264.0, 270.000 ) set u = CreateUnit( p, 'ncp3', 704.0, 2944.0, 270.000 ) set u = CreateUnit( p, 'ncp3', 1024.0, 2624.0, 270.000 ) set u = CreateUnit( p, 'ncp3', 1344.0, 2304.0, 270.000 ) set u = CreateUnit( p, 'ncp3', -1152.0, 3072.0, 270.000 ) set u = CreateUnit( p, 'ncp3', -1152.0, 2624.0, 270.000 ) endfunction //=========================================================================== function CreateNeutralPassive takes nothing returns nothing local player p = Player(PLAYER_NEUTRAL_PASSIVE) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'nC00', 580.6, 3470.8, 149.715 ) set u = CreateUnit( p, 'nsth', -1395.5, 2597.8, 242.950 ) set u = CreateUnit( p, 'hC01', 883.5, 3147.7, 44.100 ) call SetUnitState( u, UNIT_STATE_MANA, 0 ) set u = CreateUnit( p, 'nC03', 1559.7, 2492.0, 207.077 ) set u = CreateUnit( p, 'nC02', 1233.8, 2808.0, 171.667 ) set u = CreateUnit( p, 'eC04', -1413.4, 3066.6, 115.931 ) endfunction //=========================================================================== function CreatePlayerBuildings takes nothing returns nothing call CreateBuildingsForPlayer0( ) endfunction //=========================================================================== function CreatePlayerUnits takes nothing returns nothing call CreateUnitsForPlayer0( ) call CreateUnitsForPlayer1( ) endfunction //=========================================================================== function CreateAllUnits takes nothing returns nothing call CreateNeutralPassiveBuildings( ) call CreatePlayerBuildings( ) call CreateNeutralPassive( ) call CreatePlayerUnits( ) endfunction //*************************************************************************** //* //* Regions //* //*************************************************************************** function CreateRegions takes nothing returns nothing local weathereffect we set gg_rct_WhiteBase = Rect( -2464.0, 1056.0, 2304.0, 4576.0 ) set gg_rct_BlueBase1 = Rect( 3040.0, -2624.0, 4416.0, 1184.0 ) set gg_rct_BlueBase2 = Rect( 2272.0, -1920.0, 3104.0, 1088.0 ) set gg_rct_BlueBase3 = Rect( 1472.0, -1536.0, 2304.0, 544.0 ) endfunction //*************************************************************************** //* //* Upgrades //* //*************************************************************************** function InitUpgrades_Player0 takes nothing returns nothing call SetPlayerTechResearched( Player(0), 'Rhst', 2 ) call SetPlayerTechResearched( Player(0), 'Rhpt', 2 ) call SetPlayerTechResearched( Player(0), 'Rost', 2 ) call SetPlayerTechResearched( Player(0), 'Rowd', 2 ) call SetPlayerTechResearched( Player(0), 'Rune', 2 ) call SetPlayerTechResearched( Player(0), 'Ruba', 2 ) call SetPlayerTechResearched( Player(0), 'Redt', 2 ) call SetPlayerTechResearched( Player(0), 'Redc', 2 ) endfunction function InitUpgrades_Player1 takes nothing returns nothing call SetPlayerTechResearched( Player(1), 'Rhst', 2 ) call SetPlayerTechResearched( Player(1), 'Rhpt', 2 ) call SetPlayerTechResearched( Player(1), 'Rost', 2 ) call SetPlayerTechResearched( Player(1), 'Rowd', 2 ) Continued.... |
| 07-31-2002, 02:00 AM | #2 |
Guest | call SetPlayerTechResearched( Player(1), 'Rune', 2 ) call SetPlayerTechResearched( Player(1), 'Ruba', 2 ) call SetPlayerTechResearched( Player(1), 'Redt', 2 ) call SetPlayerTechResearched( Player(1), 'Redc', 2 ) endfunction function InitUpgrades_Player3 takes nothing returns nothing call SetPlayerTechResearched( Player(3), 'Rhst', 2 ) call SetPlayerTechResearched( Player(3), 'Rhpt', 2 ) call SetPlayerTechResearched( Player(3), 'Rost', 2 ) call SetPlayerTechResearched( Player(3), 'Rowd', 2 ) call SetPlayerTechResearched( Player(3), 'Rune', 2 ) call SetPlayerTechResearched( Player(3), 'Ruba', 2 ) call SetPlayerTechResearched( Player(3), 'Redt', 2 ) call SetPlayerTechResearched( Player(3), 'Redc', 2 ) endfunction function InitUpgrades_Player6 takes nothing returns nothing call SetPlayerTechResearched( Player(6), 'Rhst', 2 ) call SetPlayerTechResearched( Player(6), 'Rhpt', 2 ) call SetPlayerTechResearched( Player(6), 'Rost', 2 ) call SetPlayerTechResearched( Player(6), 'Rowd', 2 ) call SetPlayerTechResearched( Player(6), 'Rune', 2 ) call SetPlayerTechResearched( Player(6), 'Ruba', 2 ) call SetPlayerTechResearched( Player(6), 'Redt', 2 ) call SetPlayerTechResearched( Player(6), 'Redc', 2 ) endfunction function InitUpgrades_Player8 takes nothing returns nothing call SetPlayerTechResearched( Player(8), 'Rhst', 2 ) call SetPlayerTechResearched( Player(8), 'Rhpt', 2 ) call SetPlayerTechResearched( Player(8), 'Rost', 2 ) call SetPlayerTechResearched( Player(8), 'Rowd', 2 ) call SetPlayerTechResearched( Player(8), 'Rune', 2 ) call SetPlayerTechResearched( Player(8), 'Ruba', 2 ) call SetPlayerTechResearched( Player(8), 'Redt', 2 ) call SetPlayerTechResearched( Player(8), 'Redc', 2 ) endfunction function InitUpgrades takes nothing returns nothing call InitUpgrades_Player0( ) call InitUpgrades_Player1( ) call InitUpgrades_Player3( ) call InitUpgrades_Player6( ) call InitUpgrades_Player8( ) endfunction //*************************************************************************** //* //* Players //* //*************************************************************************** function InitCustomPlayerSlots takes nothing returns nothing // Player 0 call SetPlayerStartLocation( Player(0), 0 ) call ForcePlayerStartLocation( Player(0), 0 ) call SetPlayerColor( Player(0), ConvertPlayerColor(0) ) call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN ) call SetPlayerRaceSelectable( Player(0), true ) call SetPlayerController( Player(0), MAP_CONTROL_USER ) // Player 1 call SetPlayerStartLocation( Player(1), 1 ) call ForcePlayerStartLocation( Player(1), 1 ) call SetPlayerColor( Player(1), ConvertPlayerColor(1) ) call SetPlayerRacePreference( Player(1), RACE_PREF_HUMAN ) call SetPlayerRaceSelectable( Player(1), true ) call SetPlayerController( Player(1), MAP_CONTROL_USER ) // Player 3 call SetPlayerStartLocation( Player(3), 2 ) call ForcePlayerStartLocation( Player(3), 2 ) call SetPlayerColor( Player(3), ConvertPlayerColor(3) ) call SetPlayerRacePreference( Player(3), RACE_PREF_HUMAN ) call SetPlayerRaceSelectable( Player(3), true ) call SetPlayerController( Player(3), MAP_CONTROL_USER ) // Player 6 call SetPlayerStartLocation( Player(6), 3 ) call ForcePlayerStartLocation( Player(6), 3 ) call SetPlayerColor( Player(6), ConvertPlayerColor(6) ) call SetPlayerRacePreference( Player(6), RACE_PREF_HUMAN ) call SetPlayerRaceSelectable( Player(6), true ) call SetPlayerController( Player(6), MAP_CONTROL_USER ) // Player 8 call SetPlayerStartLocation( Player(8), 4 ) call ForcePlayerStartLocation( Player(8), 4 ) call SetPlayerColor( Player(8), ConvertPlayerColor(8) ) call SetPlayerRacePreference( Player(8), RACE_PREF_HUMAN ) call SetPlayerRaceSelectable( Player(8), true ) call SetPlayerController( Player(8), MAP_CONTROL_USER ) endfunction function InitCustomTeams takes nothing returns nothing // Force: Red call SetPlayerTeam( Player(0), 0 ) // Force: Blue call SetPlayerTeam( Player(1), 1 ) // Force: Black call SetPlayerTeam( Player(3), 2 ) // Force: Green call SetPlayerTeam( Player(6), 3 ) // Force: White call SetPlayerTeam( Player(8), 4 ) endfunction function InitAllyPriorities takes nothing returns nothing call SetStartLocPrioCount( 0, 2 ) call SetStartLocPrio( 0, 0, 2, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 0, 1, 3, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 1, 2 ) call SetStartLocPrio( 1, 0, 2, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 1, 1, 4, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 2, 2 ) call SetStartLocPrio( 2, 0, 0, MAP_LOC_PRIO_LOW ) call SetStartLocPrio( 2, 1, 1, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 3, 2 ) call SetStartLocPrio( 3, 0, 0, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 3, 1, 4, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 4, 2 ) call SetStartLocPrio( 4, 0, 1, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 4, 1, 3, MAP_LOC_PRIO_HIGH ) endfunction //*************************************************************************** //* //* Main Initialization //* //*************************************************************************** //=========================================================================== function main takes nothing returns nothing call SetCameraBounds( -5376.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -5120.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 4480.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 4608.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -5376.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 4608.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 4480.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -5120.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) ) call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" ) call SetAmbientDaySound( "NorthrendDay" ) call SetAmbientNightSound( "NorthrendNight" ) call SetMapMusic( "Music", true, 0 ) call InitSounds( ) call CreateRegions( ) call InitUpgrades( ) call CreateAllUnits( ) call InitBlizzard( ) call InitGlobals( ) endfunction //*************************************************************************** //* //* Map Configuration //* //*************************************************************************** function config takes nothing returns nothing call SetMapName( "TRIGSTR_001" ) call SetMapDescription( "TRIGSTR_003" ) call SetPlayers( 5 ) call SetTeams( 5 ) call SetGamePlacement( MAP_PLACEMENT_TEAMS_TOGETHER ) call DefineStartLocation( 0, -3264.0, -4544.0 ) call DefineStartLocation( 1, 3456.0, -256.0 ) call DefineStartLocation( 2, 2112.0, -4288.0 ) call DefineStartLocation( 3, -3776.0, -128.0 ) call DefineStartLocation( 4, -192.0, 2880.0 ) // Player setup call InitCustomPlayerSlots( ) call InitCustomTeams( ) call InitAllyPriorities( ) endfunction ----END SCRIPT----- Continued.... |
| 07-31-2002, 02:01 AM | #3 |
Guest | ----BEGIN TRIGGERS---- function Trig_ManaBoardInit_Func003001001 takes nothing returns boolean return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING ) endfunction function Trig_ManaBoardInit_Func003002 takes nothing returns nothing call LeaderboardAddItemBJ( GetEnumPlayer(), GetLastCreatedLeaderboard(), GetPlayerName(GetEnumPlayer()), udg_Mana[GetConvertedPlayerId(GetEnumPlayer())] ) endfunction function Trig_ManaBoardInit_Actions takes nothing returns nothing call CreateLeaderboardBJ( GetPlayersAll(), "TRIGSTR_044" ) call ForForce( GetPlayersMatching(Condition(function Trig_ManaBoardInit_Func003001001)), function Trig_ManaBoardInit_Func003002 ) call LeaderboardDisplayBJ( true, GetLastCreatedLeaderboard() ) set udg_ManaBoard = GetLastCreatedLeaderboard() set udg_ManaBoardOn = true endfunction //=========================================================================== function InitTrig_ManaBoardInit takes nothing returns nothing set gg_trg_ManaBoardInit = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_ManaBoardInit, 2.00 ) call TriggerAddAction( gg_trg_ManaBoardInit, function Trig_ManaBoardInit_Actions ) endfunction function Trig_KillBoardFirstSwitch_Func002001001 takes nothing returns boolean return ( GetPlayerSlotState(GetFilterPlayer()) == PLAYER_SLOT_STATE_PLAYING ) endfunction function Trig_KillBoardFirstSwitch_Func002002 takes nothing returns nothing call LeaderboardAddItemBJ( GetEnumPlayer(), GetLastCreatedLeaderboard(), GetPlayerName(GetEnumPlayer()), udg_Kills[GetConvertedPlayerId(GetEnumPlayer())] ) endfunction function Trig_KillBoardFirstSwitch_Actions takes nothing returns nothing call CreateLeaderboardBJ( GetPlayersAll(), "TRIGSTR_045" ) call ForForce( GetPlayersMatching(Condition(function Trig_KillBoardFirstSwitch_Func002001001)), function Trig_KillBoardFirstSwitch_Func002002 ) call LeaderboardDisplayBJ( false, udg_ManaBoard ) call LeaderboardDisplayBJ( true, GetLastCreatedLeaderboard() ) set udg_KillsBoard = GetLastCreatedLeaderboard() set udg_KillBoardOn = true set udg_ManaBoardOn = false endfunction //=========================================================================== function InitTrig_KillBoardFirstSwitch takes nothing returns nothing set gg_trg_KillBoardFirstSwitch = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_KillBoardFirstSwitch, 12.00 ) call TriggerAddAction( gg_trg_KillBoardFirstSwitch, function Trig_KillBoardFirstSwitch_Actions ) endfunction function Trig_SwitchBoardMana_Conditions takes nothing returns boolean if ( not ( udg_KillBoardOn == true ) ) then return false endif if ( not ( udg_ManaBoardOn == false ) ) then return false endif return true endfunction function Trig_SwitchBoardMana_Actions takes nothing returns nothing call TriggerSleepAction( 1.00 ) call LeaderboardDisplayBJ( false, udg_KillsBoard ) call LeaderboardDisplayBJ( true, udg_ManaBoard ) call LeaderboardSortItemsBJ( udg_ManaBoard, bj_SORTTYPE_SORTBYVALUE, false ) set udg_KillBoardOn = false set udg_ManaBoardOn = true call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_046" ) endfunction //=========================================================================== function InitTrig_SwitchBoardMana takes nothing returns nothing set gg_trg_SwitchBoardMana = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_SwitchBoardMana, 19.00 ) call TriggerAddCondition( gg_trg_SwitchBoardMana, Condition( function Trig_SwitchBoardMana_Conditions ) ) call TriggerAddAction( gg_trg_SwitchBoardMana, function Trig_SwitchBoardMana_Actions ) endfunction function Trig_SwitchBoardKills_Conditions takes nothing returns boolean if ( not ( udg_KillBoardOn == false ) ) then return false endif if ( not ( udg_ManaBoardOn == true ) ) then return false endif return true endfunction function Trig_SwitchBoardKills_Actions takes nothing returns nothing call TriggerSleepAction( 1.00 ) call LeaderboardDisplayBJ( false, udg_ManaBoard ) call LeaderboardDisplayBJ( true, udg_KillsBoard ) call LeaderboardSortItemsBJ( udg_KillsBoard, bj_SORTTYPE_SORTBYVALUE, false ) set udg_KillBoardOn = true set udg_ManaBoardOn = false endfunction //=========================================================================== function InitTrig_SwitchBoardKills takes nothing returns nothing set gg_trg_SwitchBoardKills = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_SwitchBoardKills, 19.00 ) call TriggerAddCondition( gg_trg_SwitchBoardKills, Condition( function Trig_SwitchBoardKills_Conditions ) ) call TriggerAddAction( gg_trg_SwitchBoardKills, function Trig_SwitchBoardKills_Actions ) endfunction function Trig_KillTracker_Conditions takes nothing returns boolean if ( not ( GetTriggerPlayer() != GetOwningPlayer(GetDyingUnit()) ) ) then return false endif return true endfunction function Trig_KillTracker_Actions takes nothing returns nothing set udg_Kills[GetConvertedPlayerId(GetTriggerPlayer())] = ( udg_Kills[GetConvertedPlayerId(GetTriggerPlayer())] + 1 ) endfunction //=========================================================================== function InitTrig_KillTracker takes nothing returns nothing set gg_trg_KillTracker = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_KillTracker, Player(0), EVENT_PLAYER_UNIT_DEATH ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_KillTracker, Player(1), EVENT_PLAYER_UNIT_DEATH ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_KillTracker, Player(6), EVENT_PLAYER_UNIT_DEATH ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_KillTracker, Player(3), EVENT_PLAYER_UNIT_DEATH ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_KillTracker, Player(8), EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_KillTracker, Condition( function Trig_KillTracker_Conditions ) ) call TriggerAddAction( gg_trg_KillTracker, function Trig_KillTracker_Actions ) endfunction function Trig_Daytime_Actions takes nothing returns nothing call UseTimeOfDayBJ( false ) call SetTimeOfDay( 12 ) endfunction //=========================================================================== function InitTrig_Daytime takes nothing returns nothing set gg_trg_Daytime = CreateTrigger( ) call TriggerAddAction( gg_trg_Daytime, function Trig_Daytime_Actions ) endfunction function Trig_Debuggin_Resources_Actions takes nothing returns nothing call AdjustPlayerStateBJ( 999999, Player(0), PLAYER_STATE_RESOURCE_GOLD ) call AdjustPlayerStateBJ( 999999, Player(0), PLAYER_STATE_RESOURCE_LUMBER ) endfunction //=========================================================================== function InitTrig_Debuggin_Resources takes nothing returns nothing set gg_trg_Debuggin_Resources = CreateTrigger( ) call TriggerAddAction( gg_trg_Debuggin_Resources, function Trig_Debuggin_Resources_Actions ) endfunction function Trig_WhiteBaseSnow_Actions takes nothing returns nothing call AddWeatherEffectSaveLast( gg_rct_WhiteBase, 'SNhs' ) call EnableWeatherEffect( GetLastCreatedWeatherEffect(), true ) endfunction //=========================================================================== function InitTrig_WhiteBaseSnow takes nothing returns nothing set gg_trg_WhiteBaseSnow = CreateTrigger( ) call TriggerAddAction( gg_trg_WhiteBaseSnow, function Trig_WhiteBaseSnow_Actions ) endfunction function Trig_BlueBaseRain_Actions takes nothing returns nothing call AddWeatherEffectSaveLast( gg_rct_BlueBase1, 'RAlr' ) call EnableWeatherEffect( GetLastCreatedWeatherEffect(), true ) call AddWeatherEffectSaveLast( gg_rct_BlueBase2, 'RAlr' ) call EnableWeatherEffect( GetLastCreatedWeatherEffect(), true ) call AddWeatherEffectSaveLast( gg_rct_BlueBase3, 'RAlr' ) call EnableWeatherEffect( GetLastCreatedWeatherEffect(), true ) endfunction //=========================================================================== function InitTrig_BlueBaseRain takes nothing returns nothing set gg_trg_BlueBaseRain = CreateTrigger( ) call TriggerAddAction( gg_trg_BlueBaseRain, function Trig_BlueBaseRain_Actions ) endfunction function Trig_NaturesWrathManaCheck_Conditions takes nothing returns boolean if ( not ( GetUnitTypeId(GetTrainedUnit()) == 'eC10' ) ) then return false endif return true endfunction function Trig_NaturesWrathManaCheck_Actions takes nothing returns nothing set udg_CastingUnit = GetTriggerUnit() call RemoveUnit( GetTrainedUnit() ) endfunction //=========================================================================== function InitTrig_NaturesWrathManaCheck takes nothing returns nothing set gg_trg_NaturesWrathManaCheck = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_NaturesWrathManaCheck, Player(6), EVENT_PLAYER_UNIT_TRAIN_FINISH ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_NaturesWrathManaCheck, Player(0), EVENT_PLAYER_UNIT_TRAIN_FINISH ) call TriggerAddCondition( gg_trg_NaturesWrathManaCheck, Condition( function Trig_NaturesWrathManaCheck_Conditions ) ) call TriggerAddAction( gg_trg_NaturesWrathManaCheck, function Trig_NaturesWrathManaCheck_Actions ) endfunction function Trig_NaturesWrath_Actions takes nothing returns nothing call SetUnitManaBJ( udg_CastingUnit, ( GetUnitStateSwap(UNIT_STATE_MANA, udg_CastingUnit) - 75.00 ) ) call SetPlayerUnitAvailableBJ( 'eC10', false, Player(6) ) call SetPlayerUnitAvailableBJ( 'eC10', false, Player(0) ) endfunction //=========================================================================== function InitTrig_NaturesWrath takes nothing returns nothing set gg_trg_NaturesWrath = CreateTrigger( ) call TriggerAddAction( gg_trg_NaturesWrath, function Trig_NaturesWrath_Actions ) endfunction function Trig_NaturesWrathNoMana_Actions takes nothing returns nothing call PlaySoundBJ( gg_snd_SentinelNoEnergy1 ) endfunction //=========================================================================== function InitTrig_NaturesWrathNoMana takes nothing returns nothing set gg_trg_NaturesWrathNoMana = CreateTrigger( ) call TriggerAddAction( gg_trg_NaturesWrathNoMana, function Trig_NaturesWrathNoMana_Actions ) endfunction function Trig_NaturesWrath2_Actions takes nothing returns nothing call DisableTrigger( GetTriggeringTrigger() ) call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\NightElf\\CorrosiveBreath\\ChimaeraAcidTargetArt.mdx" ) set udg_NaturesWrathEffect = GetLastCreatedEffectBJ() call AttachSoundToUnitBJ( gg_snd_ChimaeraAlternateMissileHit1, GetTriggerUnit() ) call PlaySoundBJ( gg_snd_ChimaeraAlternateMissileHit1 ) call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - 500.00 ) ) call StartTimerBJ( udg_NaturesWrathEffectTimer, false, 1.00 ) call StartTimerBJ( udg_NaturesWrathRecharge, false, 20.00 ) endfunction //=========================================================================== function InitTrig_NaturesWrath2 takes nothing returns nothing set gg_trg_NaturesWrath2 = CreateTrigger( ) call DisableTrigger( gg_trg_NaturesWrath2 ) call TriggerRegisterPlayerSelectionEventBJ( gg_trg_NaturesWrath2, Player(0), true ) call TriggerRegisterPlayerSelectionEventBJ( gg_trg_NaturesWrath2, Player(6), true ) call TriggerAddAction( gg_trg_NaturesWrath2, function Trig_NaturesWrath2_Actions ) endfunction function Trig_NaturesWrathEnd_Actions takes nothing returns nothing call DisableTrigger( GetTriggeringTrigger() ) call DestroyEffectBJ( udg_NaturesWrathEffect ) endfunction //=========================================================================== function InitTrig_NaturesWrathEnd takes nothing returns nothing set gg_trg_NaturesWrathEnd = CreateTrigger( ) call DisableTrigger( gg_trg_NaturesWrathEnd ) call TriggerRegisterTimerExpireEventBJ( gg_trg_NaturesWrathEnd, udg_NaturesWrathEffectTimer ) call TriggerAddAction( gg_trg_NaturesWrathEnd, function Trig_NaturesWrathEnd_Actions ) endfunction function Trig_NaturesWrathRecharge_Actions takes nothing returns nothing call DisableTrigger( GetTriggeringTrigger() ) call SetPlayerUnitAvailableBJ( 'eC10', true, Player(6) ) call SetPlayerUnitAvailableBJ( 'eC10', true, Player(0) ) endfunction //=========================================================================== function InitTrig_NaturesWrathRecharge takes nothing returns nothing set gg_trg_NaturesWrathRecharge = CreateTrigger( ) call DisableTrigger( gg_trg_NaturesWrathRecharge ) call TriggerRegisterTimerExpireEventBJ( gg_trg_NaturesWrathRecharge, udg_NaturesWrathRecharge ) call TriggerAddAction( gg_trg_NaturesWrathRecharge, function Trig_NaturesWrathRecharge_Actions ) endfunction ----END TRIGGERS---- Good thing I'd only just started on the triggers, in case I can't fix it... Anyway, I'm having trouble copying the errors, as there's no cursor in the box (Each different error is in its own field in the window, and I can't select the actual text, only the field).... I'll post again if I can figure a way. I have 2 theories on why this might have happened: Just before, I had applied the No-CD crack for the WE (because it loads so much faster). Also, I had just imported UnitMetaData.slk into the map with MPQ2k, and when I try to list the contents of the map's archive with mpq2k, I get a message that the file is corrupted. |
| 07-31-2002, 02:04 AM | #4 |
Guest | I was right... I restored my backup of the normal, non-cracked version of the editor, and the problem fixed itself. |
