HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need Help with laggy Multibourds

05-15-2005, 06:49 PM#1
BlinkBoy
so on i have found that my multibourd system for my map causes lag, since i desectivated them, the lag was totally out. I heard ,or read cause i'm not hearing tin this forums, that blizzard multibourds causes lag, and it increments bytime.

if some1 could help, here is the WE representation.
Code:
  
Events
	Time - Elapsed game time is 10.00 seconds
Actions
	Multiboard - Create a multiboard with 1 columns and 10 rows, titled Stats
	Set Multibourd = (Last created multiboard)
	For each (Integer A) from 1 to 12, do (Actions)
		Loop - Actions
			If (All Conditions are True) then do (Then Actions) else do (Else Actions)
				If - Conditions
					((Player((Integer A))) slot status) Equal to Is playing
					((Player((Integer A))) controller) Equal to User
				Then - Actions
					If (All Conditions are True) then do (Then Actions) else do (Else Actions)
						If - Conditions
							(Local player) Equal to (Player((Integer A)))
						Then - Actions
							Multiboard - Change the title of Multibourd to (Stats:  + (Name of (Player((Integer A)))))
							Multiboard - Set the text for Multibourd item in column 1, row 1 to (Terretory controlled:  + ((String((((Number of units in (Units owned by (Player((Integer A))) matching (((Matching unit) is An Ancient) Equal to True))) x 100) / 146))) + %))
							Multiboard - Set the text for Multibourd item in column 1, row 2 to (Gold Income:  + (String(((Number of units in (Units owned by (Player((Integer A))) matching (((Matching unit) is An Ancient) Equal to True))) x 100))))
							Multiboard - Set the text for Multibourd item in column 1, row 3 to (Lumber Income:  + (String(((Number of units in (Units owned by (Player((Integer A))) matching (((Matching unit) is An Ancient) Equal to True))) x 10))))
							Multiboard - Set the text for Multibourd item in column 1, row 4 to (Infantery:  + (String((((Number of living |c00ffff00Light Infantry|r units owned by (Player((Integer A)))) + ((Number of living |c00004000Medium Infantry|r units owned by (Player((Integer A)))) + (Number of living |c0096673dGerman Heavy Infantry|r units owne
							Multiboard - Set the text for Multibourd item in column 1, row 5 to (Range:  + (String(((((Number of living |c00ff8000HandCannoneer|r units owned by (Player((Integer A)))) + (Number of living |c00804040Short Bowman|r units owned by (Player((Integer A))))) + (Number of living |c00ffff00Moorish Spearman|r units owned by (Player
							Multiboard - Set the text for Multibourd item in column 1, row 6 to (Cavalry:  + (String(((((((Number of living |c0000ff00Light Calvary|r units owned by (Player((Integer A)))) + (Number of living |c00008080Fuedal Knight|r units owned by (Player((Integer A))))) + (Number of living |c00808080Russian Cossack.|r units owned by (P
							Multiboard - Set the text for Multibourd item in column 1, row 7 to (Naval Army:  + (String(((((((Number of living |c00008000Cargo Vessel|r units owned by (Player((Integer A)))) + (Number of living |c00008000Galley|r units owned by (Player((Integer A))))) + (Number of living |c00008000Cannon Ship|r units owned by (Player((Int
							Multiboard - Set the text for Multibourd item in column 1, row 8 to (Siege:  + (String((((((Number of living |c0000ff00Ballista|r units owned by (Player((Integer A)))) + (Number of living |c00004000Mortar Team|r units owned by (Player((Integer A))))) + (Number of living |c00ff8040Catapult|r units owned by (Player((Integer A))
							Multiboard - Set the text for Multibourd item in column 1, row 9 to (Others:  + (String((((((((Number of living |c00c0c0c0Peasant|r units owned by (Player((Integer A)))) + (Number of living |c000080ffChristian Monk|r units owned by (Player((Integer A))))) + (Number of living |c00ff8040Christian Missionary|r units owned by (Pl
						Else - Actions
				Else - Actions
	-------- ---------------------------Coloring text--------------------------------- --------
	If (All Conditions are True) then do (Then Actions) else do (Else Actions)
		If - Conditions
			(Local player) Equal to Player 1 (Red)
		Then - Actions
			Multiboard - Set the color for Multibourd item in column 1, row 0 to (100.00%, 10.00%, 10.00%) with 25.00% transparency
		Else - Actions
	If (All Conditions are True) then do (Then Actions) else do (Else Actions)
		If - Conditions
			(Local player) Equal to Player 2 (Blue)
		Then - Actions
			Multiboard - Set the color for Multibourd item in column 1, row 0 to (10.00%, 10.00%, 100.00%) with 25.00% transparency
		Else - Actions
	If (All Conditions are True) then do (Then Actions) else do (Else Actions)
		If - Conditions
			(Local player) Equal to Player 3 (Teal)
		Then - Actions
			Multiboard - Set the color for Multibourd item in column 1, row 0 to (41.00%, 91.00%, 93.00%) with 25.00% transparency
		Else - Actions
	If (All Conditions are True) then do (Then Actions) else do (Else Actions)
		If - Conditions
			(Local player) Equal to Player 4 (Purple)
		Then - Actions
			Multiboard - Set the color for Multibourd item in column 1, row 0 to (63.00%, 7.81%, 53.51%) with 25.00% transparency
		Else - Actions
	If (All Conditions are True) then do (Then Actions) else do (Else Actions)
		If - Conditions
			(Local player) Equal to Player 5 (Yellow)
		Then - Actions
			Multiboard - Set the color for Multibourd item in column 1, row 0 to (100.00%, 100.00%, 0.00%) with 25.00% transparency
		Else - Actions
	If (All Conditions are True) then do (Then Actions) else do (Else Actions)
		If - Conditions
			(Local player) Equal to Player 6 (Orange)
		Then - Actions
			Multiboard - Set the color for Multibourd item in column 1, row 0 to (100.00%, 58.59%, 0.00%) with 25.00% transparency
		Else - Actions
	Custom script: if GetLocalPlayer() == Player(6) then
	Multiboard - Set the color for Multibourd item in column 1, row 0 to (7.03%, 100.00%, 0.00%) with 25.00% transparency
	Custom script: endif
	Custom script: if GetLocalPlayer() == Player(7) then
	Multiboard - Set the color for Multibourd item in column 1, row 0 to (90.23%, 42.96%, 56.25%) with 25.00% transparency
	Custom script: endif
	Custom script: if GetLocalPlayer() == Player(8) then
	Multiboard - Set the color for Multibourd item in column 1, row 0 to (70.00%, 70.00%, 70.00%) with 25.00% transparency
	Custom script: endif
	Custom script: if GetLocalPlayer() == Player(9) then
	Multiboard - Set the color for Multibourd item in column 1, row 0 to (67.96%, 81.25%, 99.21%) with 25.00% transparency
	Custom script: endif
	Custom script: if GetLocalPlayer() == Player(10) then
	Multiboard - Set the color for Multibourd item in column 1, row 0 to (7.03%, 42.96%, 0.00%) with 25.00% transparency
	Custom script: endif
	Custom script: if GetLocalPlayer() == Player(11) then
	Multiboard - Set the color for Multibourd item in column 1, row 0 to (37.50%, 23.82%, 0.00%) with 25.00% transparency
	Custom script: endif
	-------- ---------------------------End Coloring text--------------------------------- --------
	-------- ---------------------------Icons----------------------------------- --------
	Multiboard - Set the icon for Multibourd item in column 1, row 1 to ReplaceableTextures\CommandButtons\BTNOrbOfFrost.blp
	Multiboard - Set the icon for Multibourd item in column 1, row 2 to ReplaceableTextures\CommandButtons\BTNChestOfGold.blp
	Multiboard - Set the icon for Multibourd item in column 1, row 3 to ReplaceableTextures\CommandButtons\BTNBundleOfLumber.blp
	Multiboard - Set the icon for Multibourd item in column 1, row 4 to ReplaceableTextures\CommandButtons\BTNThoriumMelee.blp
	Multiboard - Set the icon for Multibourd item in column 1, row 5 to ReplaceableTextures\CommandButtons\BTNImprovedBows.blp
	Multiboard - Set the icon for Multibourd item in column 1, row 6 to ReplaceableTextures\CommandButtons\BTNAnimalWarTraining.blp
	Multiboard - Set the icon for Multibourd item in column 1, row 7 to ReplaceableTextures\CommandButtons\BTNHumanBattleShip.blp
	Multiboard - Set the icon for Multibourd item in column 1, row 8 to ReplaceableTextures\CommandButtons\BTNFireRocks.blp
	Multiboard - Set the icon for Multibourd item in column 1, row 9 to ReplaceableTextures\CommandButtons\BTNBarkskin.blp
	-------- ---------------------------Icons End----------------------------------- --------
	Multiboard - Set the text for Multibourd item in column 1, row 10 to (Year:  + (String(Year)))
	Multiboard - Set the display style for Multibourd item in column 1, row 10 to Show text and Hide icons
	Multiboard - Set the width for Multibourd item in column 1, row 1 to 15.00% of the total screen width
	Multiboard - Set the width for Multibourd item in column 1, row 2 to 12.00% of the total screen width
	Multiboard - Set the width for Multibourd item in column 1, row 3 to 12.00% of the total screen width
	Multiboard - Set the width for Multibourd item in column 1, row 4 to 12.00% of the total screen width
	Multiboard - Set the width for Multibourd item in column 1, row 5 to 12.00% of the total screen width
	Multiboard - Set the width for Multibourd item in column 1, row 6 to 12.00% of the total screen width
	Multiboard - Set the width for Multibourd item in column 1, row 7 to 12.00% of the total screen width
	Multiboard - Set the width for Multibourd item in column 1, row 8 to 12.00% of the total screen width
	Multiboard - Set the width for Multibourd item in column 1, row 9 to 12.00% of the total screen width
	Multiboard - Set the width for Multibourd item in column 1, row 10 to 12.00% of the total screen width


and here is for upgrade

Code:
 
Events
	Unit - A unit Finishes training a unit
	Unit - A unit Dies
Actions
	For each (Integer A) from 1 to 12, do (Actions)
		Loop - Actions
			If (All Conditions are True) then do (Then Actions) else do (Else Actions)
				If - Conditions
					((Player((Integer A))) slot status) Equal to Is playing
					((Player((Integer A))) controller) Equal to User
				Then - Actions
					If (All Conditions are True) then do (Then Actions) else do (Else Actions)
						If - Conditions
							(Local player) Equal to (Player((Integer A)))
						Then - Actions
							Multiboard - Change the title of Multibourd to (Stats:  + (Name of (Player((Integer A)))))
							Multiboard - Set the text for Multibourd item in column 1, row 1 to (Terretory controlled:  + ((String((((Number of units in (Units owned by (Player((Integer A))) matching (((Matching unit) is An Ancient) Equal to True))) x 100) / 146))) + %))
							Multiboard - Set the text for Multibourd item in column 1, row 2 to (Gold Income:  + (String(((Number of units in (Units owned by (Player((Integer A))) matching (((Matching unit) is An Ancient) Equal to True))) x 100))))
							Multiboard - Set the text for Multibourd item in column 1, row 3 to (Lumber Income:  + (String(((Number of units in (Units owned by (Player((Integer A))) matching (((Matching unit) is An Ancient) Equal to True))) x 10))))
							Multiboard - Set the text for Multibourd item in column 1, row 4 to (Infantery:  + (String((((Number of living |c00ffff00Light Infantry|r units owned by (Player((Integer A)))) + ((Number of living |c00004000Medium Infantry|r units owned by (Player((Integer A)))) + (Number of living |c0096673dGerman Heavy Infantry|r units owne
							Multiboard - Set the text for Multibourd item in column 1, row 5 to (Range:  + (String(((((Number of living |c00ff8000HandCannoneer|r units owned by (Player((Integer A)))) + (Number of living |c00804040Short Bowman|r units owned by (Player((Integer A))))) + (Number of living |c00ffff00Moorish Spearman|r units owned by (Player
							Multiboard - Set the text for Multibourd item in column 1, row 6 to (Cavalry:  + (String(((((((Number of living |c0000ff00Light Calvary|r units owned by (Player((Integer A)))) + (Number of living |c00008080Fuedal Knight|r units owned by (Player((Integer A))))) + (Number of living |c00808080Russian Cossack.|r units owned by (P
							Multiboard - Set the text for Multibourd item in column 1, row 7 to (Naval Army:  + (String(((((((Number of living |c00008000Cargo Vessel|r units owned by (Player((Integer A)))) + (Number of living |c00008000Galley|r units owned by (Player((Integer A))))) + (Number of living |c00008000Cannon Ship|r units owned by (Player((Int
							Multiboard - Set the text for Multibourd item in column 1, row 8 to (Siege:  + (String((((((Number of living |c0000ff00Ballista|r units owned by (Player((Integer A)))) + (Number of living |c00004000Mortar Team|r units owned by (Player((Integer A))))) + (Number of living |c00ff8040Catapult|r units owned by (Player((Integer A))
							Multiboard - Set the text for Multibourd item in column 1, row 9 to (Others:  + (String((((((((Number of living |c00c0c0c0Peasant|r units owned by (Player((Integer A)))) + (Number of living |c000080ffChristian Monk|r units owned by (Player((Integer A))))) + (Number of living |c00ff8040Christian Missionary|r units owned by (Pl
							Advanced - Take Morale_Multibourd and set the fill state for the progress bar in row 1 to ((Real(Morale[((Integer A) - 1)])) / 10.00) percent
						Else - Actions
				Else - Actions
	If (Year Greater than or equal to 1492) then do (Multiboard - Set the text for Multibourd item in column 1, row 10 to (Year:  + 1492)) else do (Multiboard - Set the text for Multibourd item in column 1, row 10 to (Year:  + (String(Year))))