HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Flag Tag Lag?

10-06-2004, 06:09 AM#1
Chryosmere
OK i made a kind of gameplay mode for my map.. It's just like on those games like goldeneye and perfect dark where a flag or something is created and your team has to hold the flag until the time that you hold it accumulates to 600 seconds. Theres just one problem.. It all works perfectly but there seems to be slight lag every second or so which is not good lol. My friends with way better computers than me (i have 1.01ghz) say they don't lag but still.. I'm probably not the only one with a bad computer.. I'll run you through the triggers..

This just sets up all the triggers (I havn't decided how to implemented it so its just activated by a chat string). The problem wouldnt be here lol.

Code:
UFT Start Uber Flag Tag
    Events
        Player - Player 1 (Red) types a chat message containing -ubertag as An exact match
    Conditions
    Actions
        Item - Create Uber Flag at (Random point in FlagSpawn <gen>)
        Game - Display to (All players) for 20.00 seconds the text:     == Uber Flag Ta...
        Trigger - Run UFT Set up Multiboard <gen> (checking conditions)
        Trigger - Turn on UFT Set Up  Points <gen>
        Trigger - Turn on UFT Declare Winner <gen>
        Trigger - Turn on UFT Showing the Flag <gen>

This just sets up the multiboard things that wont be changed... I don't think the problem is here.
Code:
UFT Set up Multiboard
    Events
    Conditions
    Actions
        Multiboard - Create a multiboard with 2 columns and 6 rows, titled Uber Flag Tag Scores
        Set UberFlagBoard = (Last created multiboard)
        Multiboard - Set the display style for UberFlagBoard item in column 0, row 0 to Show text and Hide icons
        Multiboard - Set the width for UberFlagBoard item in column 0, row 0 to 6.00% of the total screen width
        Multiboard - Set the text for UberFlagBoard item in column 1, row 1 to |cffBBB135Team 1
        Multiboard - Set the text for UberFlagBoard item in column 1, row 2 to |cffBBB135Team 2
        Multiboard - Set the text for UberFlagBoard item in column 1, row 3 to |cffBBB135Team 3
        Multiboard - Set the text for UberFlagBoard item in column 1, row 4 to |cffBBB135Team 4
        Multiboard - Set the text for UberFlagBoard item in column 1, row 5 to |cffBBB135Team 5
        Multiboard - Set the text for UberFlagBoard item in column 1, row 6 to |cffBBB135Team 6
        Wait 2.00 seconds
        Multiboard - Show UberFlagBoard

Now.. This is the trigger that checks to see if a player has the flag, if they do it sets their teams score up 1 point each second. Then at the bottom it applies the score to the score board every second. This is where the lag might be coming from me thinks! (I tried making it refresh the scoreboard every 20 seconds but the lag was still here. If it's in this trigger im guessing it's the loops checking and setting the integers).
Code:
UFT Set Up  Points
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 1 (Red)
                                (Owner of (Picked unit)) Equal to Player 2 (Blue)
                    Then - Actions
                        Set UF_Points1 = (UF_Points1 + 1)
                    Else - Actions
                        Do nothing
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 3 (Teal)
                                (Owner of (Picked unit)) Equal to Player 4 (Purple)
                    Then - Actions
                        Set UF_Points2 = (UF_Points2 + 1)
                    Else - Actions
                        Do nothing
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 5 (Yellow)
                                (Owner of (Picked unit)) Equal to Player 6 (Orange)
                    Then - Actions
                        Set UF_Points3 = (UF_Points3 + 1)
                    Else - Actions
                        Do nothing
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 7 (Green)
                                (Owner of (Picked unit)) Equal to Player 8 (Pink)
                    Then - Actions
                        Set UF_Points4 = (UF_Points4 + 1)
                    Else - Actions
                        Do nothing
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 9 (Gray)
                                (Owner of (Picked unit)) Equal to Player 10 (Light Blue)
                    Then - Actions
                        Set UF_Points5 = (UF_Points5 + 1)
                    Else - Actions
                        Do nothing
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 11 (Dark Green)
                                (Owner of (Picked unit)) Equal to Player 12 (Brown)
                    Then - Actions
                        Set UF_Points6 = (UF_Points6 + 1)
                    Else - Actions
                        Do nothing
        Multiboard - Set the text for UberFlagBoard item in column 2, row 1 to (String(UF_Points1))
        Multiboard - Set the text for UberFlagBoard item in column 2, row 2 to (String(UF_Points2))
        Multiboard - Set the text for UberFlagBoard item in column 2, row 3 to (String(UF_Points3))
        Multiboard - Set the text for UberFlagBoard item in column 2, row 4 to (String(UF_Points4))
        Multiboard - Set the text for UberFlagBoard item in column 2, row 5 to (String(UF_Points5))
        Multiboard - Set the text for UberFlagBoard item in column 2, row 6 to (String(UF_Points6))

This pretty much pings where the flag or where the player with the flag is every 4 seconds. I took this out to see if the lag would stop but it still went.. So i don't think this is the cause).
Code:
UFT Showing the Flag
    Events
        Time - Every 4.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units of type Geno-E Human Marine) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                    Then - Actions
                        Cinematic - Ping minimap for (All players) at (Position of (Picked unit)) for 2.00 seconds, using a Warning ping of color (100.00%, 0.00%, 0.00%)
                    Else - Actions
                        Do nothing
        Item - Pick every item in (Playable map area) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-type of (Picked item)) Equal to Uber Flag
                    Then - Actions
                        Cinematic - Ping minimap for (All players) at (Position of (Picked item)) for 2.00 seconds, using a Warning ping of color (100.00%, 0.00%, 0.00%)
                    Else - Actions
                        Do nothing

This checks to see if anyone has reached the winning score and turns off the uber tag mode. I don't know if this is the problem but you never know..
Code:
UFT Declare Winner
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points1 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[1] + (Name of Player 1 (Red))) + ((|r and  + ((PlayerColors[2] + (Name of Player 2 (Blue))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (Units in (Playable map area)((Unit-type of (Matching unit)) Equal to FlagFollower)) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points2 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[3] + (Name of Player 3 (Teal))) + ((|r and  + ((PlayerColors[4] + (Name of Player 4 (Purple))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (Units in (Playable map area)((Unit-type of (Matching unit)) Equal to FlagFollower)) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points3 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[5] + (Name of Player 5 (Yellow))) + ((|r and  + ((PlayerColors[6] + (Name of Player 6 (Orange))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (Units in (Playable map area)((Unit-type of (Matching unit)) Equal to FlagFollower)) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points4 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[7] + (Name of Player 7 (Green))) + ((|r and  + ((PlayerColors[8] + (Name of Player 8 (Pink))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (Units in (Playable map area)((Unit-type of (Matching unit)) Equal to FlagFollower)) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points5 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[9] + (Name of Player 9 (Gray))) + ((|r and  + ((PlayerColors[10] + (Name of Player 10 (Light Blue))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (Units in (Playable map area)((Unit-type of (Matching unit)) Equal to FlagFollower)) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points6 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[11] + (Name of Player 11 (Dark Green))) + ((|r and  + ((PlayerColors[12] + (Name of Player 12 (Brown))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (Units in (Playable map area)((Unit-type of (Matching unit)) Equal to FlagFollower)) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions

These last two triggers just check when a unit gets/drops the flag.. I don't think these are causing the problem!
Code:
UFT Unit drops flag
    Events
        Unit - A unit Loses an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Uber Flag
    Actions
        Set FlagBearer = No unit
        Unit - Set (Hero manipulating item) movement speed to 320.00
        Game - Display to (All players) for 5.00 seconds the text: (PlayerColors[(Player number of (Owner of (Hero manipulating item)))] + ((Name of (Owner of (Hero manipulating item))) + |r has dropped the Uber Flag!))
Code:
UFT Unit gets flag
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Uber Flag
    Actions
        Set FlagBearer = (Hero manipulating item)
        Unit - Set (Hero manipulating item) movement speed to 250.00
        Game - Display to (All players) for 5.00 seconds the text: (PlayerColors[(Player number of (Owner of (Hero manipulating item)))] + ((Name of (Owner of (Hero manipulating item))) + |r has grabbed the Uber Flag!))

So yeh thats everything. If you can see any reason why it is lagging me tell me please :P Is it just my stupid computer or is my friend lying lol. I do have 640 ram though.. Anyway all the triggers that are initially turned off are the ones that are turned on at the start trigger.. So yeh thats everything. Help is much appreciated!
10-07-2004, 04:03 AM#2
Rafael Br
Basically, you have points and unit groups that are leaking, there are somethings that you should do:
We don't have anithing wrong here:
Code:
UFT Start Uber Flag Tag
    Events
        Player - Player 1 (Red) types a chat message containing -ubertag as An exact match
    Conditions
    Actions
        Item - Create Uber Flag at (Random point in FlagSpawn <gen>)
        Game - Display to (All players) for 20.00 seconds the text:     == Uber Flag Ta...
        Trigger - Run UFT Set up Multiboard <gen> (checking conditions)
        Trigger - Turn on UFT Set Up  Points <gen>
        Trigger - Turn on UFT Declare Winner <gen>
        Trigger - Turn on UFT Showing the Flag <gen>

Neither Here:
Code:
UFT Set up Multiboard
    Events
    Conditions
    Actions
        Multiboard - Create a multiboard with 2 columns and 6 rows, titled Uber Flag Tag Scores
        Set UberFlagBoard = (Last created multiboard)
        Multiboard - Set the display style for UberFlagBoard item in column 0, row 0 to Show text and Hide icons
        Multiboard - Set the width for UberFlagBoard item in column 0, row 0 to 6.00% of the total screen width
        Multiboard - Set the text for UberFlagBoard item in column 1, row 1 to |cffBBB135Team 1
        Multiboard - Set the text for UberFlagBoard item in column 1, row 2 to |cffBBB135Team 2
        Multiboard - Set the text for UberFlagBoard item in column 1, row 3 to |cffBBB135Team 3
        Multiboard - Set the text for UberFlagBoard item in column 1, row 4 to |cffBBB135Team 4
        Multiboard - Set the text for UberFlagBoard item in column 1, row 5 to |cffBBB135Team 5
        Multiboard - Set the text for UberFlagBoard item in column 1, row 6 to |cffBBB135Team 6
        Wait 2.00 seconds
        Multiboard - Show UberFlagBoard

But... there is a lot of leak here...
Code:
UFT Set Up  Points
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        set TempGroup = (Units in (Playable map area)
        Unit Group - Pick every unit in (Units in TempGroup) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 1 (Red)
                                (Owner of (Picked unit)) Equal to Player 2 (Blue)
                    Then - Actions
                        Set UF_Points1 = (UF_Points1 + 1)
                    Else - Actions
                        Do nothing
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 3 (Teal)
                                (Owner of (Picked unit)) Equal to Player 4 (Purple)
                    Then - Actions
                        Set UF_Points2 = (UF_Points2 + 1)
                    Else - Actions
                        Do nothing
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 5 (Yellow)
                                (Owner of (Picked unit)) Equal to Player 6 (Orange)
                    Then - Actions
                        Set UF_Points3 = (UF_Points3 + 1)
                    Else - Actions
                        Do nothing
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 7 (Green)
                                (Owner of (Picked unit)) Equal to Player 8 (Pink)
                    Then - Actions
                        Set UF_Points4 = (UF_Points4 + 1)
                    Else - Actions
                        Do nothing
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 9 (Gray)
                                (Owner of (Picked unit)) Equal to Player 10 (Light Blue)
                    Then - Actions
                        Set UF_Points5 = (UF_Points5 + 1)
                    Else - Actions
                        Do nothing
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                        Or - Any (Conditions) are true
                            Conditions
                                (Owner of (Picked unit)) Equal to Player 11 (Dark Green)
                                (Owner of (Picked unit)) Equal to Player 12 (Brown)
                    Then - Actions
                        Set UF_Points6 = (UF_Points6 + 1)
                    Else - Actions
                        Do nothing
        Multiboard - Set the text for UberFlagBoard item in column 2, row 1 to (String(UF_Points1))
        Multiboard - Set the text for UberFlagBoard item in column 2, row 2 to (String(UF_Points2))
        Multiboard - Set the text for UberFlagBoard item in column 2, row 3 to (String(UF_Points3))
        Multiboard - Set the text for UberFlagBoard item in column 2, row 4 to (String(UF_Points4))
        Multiboard - Set the text for UberFlagBoard item in column 2, row 5 to (String(UF_Points5))
        Multiboard - Set the text for UberFlagBoard item in column 2, row 6 to (String(UF_Points6))
        Custom Script: call DestroyGroup(udg_TempGroup)
          Why did you pick every units all the time?And... the custom script is for cleaning the group, there is no way cleaning it without setting it into a new variable.

The same group Problem here...
Code:
UFT Showing the Flag
    Events
        Time - Every 4.00 seconds of game time
    Conditions
    Actions
        set TempGroup = Units of type Geno-E Human Marine(Use the same variable)
        Unit Group - Pick every unit in (TempGroup) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has an item of type Uber Flag) Equal to True
                    Then - Actions
                        set Tempoint(Point variable, it has to be cleaned too) = Position of (Picked unit)
                        Cinematic - Ping minimap for (All players) at (Tempoint) for 2.00 seconds, using a Warning ping of color (100.00%, 0.00%, 0.00%)
                    Else - Actions
                        Do nothing
        Item - Pick every item in (Playable map area) and do (Actions)\\ I don't have any idea if this will leak...
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Item-type of (Picked item)) Equal to Uber Flag
                    Then - Actions
                        set Tempoint = Position of (Picked item)
                        Cinematic - Ping minimap for (All players) at (Tempoint) for 2.00 seconds, using a Warning ping of color (100.00%, 0.00%, 0.00%)
                    Else - Actions
                        Do nothing
        Custom Script:call RemoveLocation(udg_Tempoint) - This will remove the point that you used.
        Custom Script: call DestroyGroup(udg_TempGroup)
        
This has a group to clean too...
Code:
UFT Declare Winner
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        set TempGroup = Units in (Playable map area)((Unit-type of (Matching unit)) Equal to FlagFollower)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points1 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[1] + (Name of Player 1 (Red))) + ((|r and  + ((PlayerColors[2] + (Name of Player 2 (Blue))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (TempGroup) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points2 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[3] + (Name of Player 3 (Teal))) + ((|r and  + ((PlayerColors[4] + (Name of Player 4 (Purple))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (TempGroup) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points3 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[5] + (Name of Player 5 (Yellow))) + ((|r and  + ((PlayerColors[6] + (Name of Player 6 (Orange))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (TempGroup) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points4 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[7] + (Name of Player 7 (Green))) + ((|r and  + ((PlayerColors[8] + (Name of Player 8 (Pink))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (TempGroup) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points5 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[9] + (Name of Player 9 (Gray))) + ((|r and  + ((PlayerColors[10] + (Name of Player 10 (Light Blue))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (TempGroup) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                UF_Points6 Greater than or equal to 600
            Then - Actions
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[11] + (Name of Player 11 (Dark Green))) + ((|r and  + ((PlayerColors[12] + (Name of Player 12 (Brown))) + |r have won!)) +  ))
                Trigger - Turn off (This trigger)
                Trigger - Turn off UFT Set up Multiboard <gen>
                Trigger - Turn off UFT Set Up  Points <gen>
                Trigger - Turn off UFT Showing the Flag <gen>
                Multiboard - Hide UberFlagBoard
                Multiboard - Show MultiBoard
                Unit Group - Pick every unit in (TempGroup) and do (Unit - Move (Picked unit) instantly to (Center of Unused Flag <gen>))
            Else - Actions
       Custom Script: call DestroyGroup(udg_TempGroup)
 

The last 2 triggers doesn't have anithing wrong, the main problem was in the Set up points trigger.
10-07-2004, 07:04 AM#3
Guest
I'm not sure but I tried that and i didn't lag... and btw that is a FUCKLOAD of shit
10-07-2004, 07:15 AM#4
Chryosmere
Your a legend for answering lol. I'll add that stuff you said to put in Rafael and see if it's fixed. I had a feeling it was leaking but i didn't know how exactly to stop it so thanks. Also i picked every unit all the time in that trigger because it was 4am and I was half asleep when i did this

Edit: Just tested and the lag is completely gone!
10-07-2004, 07:18 AM#5
Guest
Your So Gay Emoo Give me some credit 2 look at this spam
10-07-2004, 07:20 AM#6
Guest
Am I Even Allowed To Spam Or Swear ?? Or Am I Gonna Get Banned Again?? I Got Banned 2 Years Ago For The Same Thing
10-07-2004, 07:57 AM#7
Anitarf
Yeah, you are leaking groups and points, but it's not that critical, it's 6 groups every second and an additional group and point every 4 seconds. nyway, it's still nice to clear memory leaks, but I don't see this as the real problem. With memory leaks, the gme becomes laggy later, when memory clogs up, and not from the beggining.

Also, you should optimize your code with loops and arrays. Instead of repeating the nearly same code for 6 times, use a loop. This is not your problem, though. The code would still run the same ammount of time, it would only be more optimized, shorter, so it would load up faster.
10-07-2004, 02:41 PM#8
Chryosmere
Ok i have another problem lol! This one is only one trigger though. It's just not working. OK.. The trigger is supposed to make it when a unit dies it is made smaller and its size (integer array( SM_size)) is reduced by one. If it gets to 0, that unit is eliminated but is still respawned to help their ally win or just cause havoc and is put back to it's original size. If a unit kills a unit it is made bigger. If it reaches the (integer array( SM_size)) 9 it will stop growing and will stop getting points into SM_size. SM_size is constantly displayed on a multiboard. The bottom If, Then, Else is just for the winner so when number of players = number of people eliminated + 1 it will declar that person the winner.

The 2 If, then, elses at the top of the trigger just make sure that if your at 9 or 1 you wont get anymore points on the scoreboard. Then set the points as the actions.

Now here is the problem:
It does't work.
It doesn't change the unit's size and it does'nt change the multiboard (nothing wrong with the multiboard trigs). Umm... and yeh so basically doesn't work at all.

Any help is appreciated!
Code:
SM Core Stuff
    Events
        Unit - A unit Dies
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SM_Size[(Player number of (Owner of (Dying unit)))] Greater than 0
            Then - Actions
                Set SM_Size[(Player number of (Owner of (Dying unit)))] = (SM_Size[(Player number of (Owner of (Dying unit)))] - 1)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                SM_Size[(Player number of (Owner of (Killing unit)))] Less than 9
            Then - Actions
                Set SM_Size[(Player number of (Owner of (Killing unit)))] = (SM_Size[(Player number of (Owner of (Killing unit)))] + 1)
            Else - Actions
        -------- Killing Units --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Killing unit)))] Equal to 9
            Then - Actions
                Animation - Change (Killing unit)'s size to (190.00%, 190.00%, 190.00%) of its original size
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Killing unit)))] Equal to 8
            Then - Actions
                Animation - Change (Killing unit)'s size to (170.00%, 170.00%, 170.00%) of its original size
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Killing unit)))] Equal to 7
            Then - Actions
                Animation - Change (Killing unit)'s size to (140.00%, 140.00%, 140.00%) of its original size
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Killing unit)))] Equal to 6
            Then - Actions
                Animation - Change (Killing unit)'s size to (120.00%, 120.00%, 120.00%) of its original size
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Killing unit)))] Equal to 5
            Then - Actions
                Animation - Change (Killing unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Killing unit)))] Equal to 4
            Then - Actions
                Animation - Change (Killing unit)'s size to (88.00%, 88.00%, 88.00%) of its original size
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Killing unit)))] Equal to 3
            Then - Actions
                Animation - Change (Killing unit)'s size to (76.00%, 76.00%, 76.00%) of its original size
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Killing unit)))] Equal to 2
            Then - Actions
                Animation - Change (Killing unit)'s size to (64.00%, 64.00%, 64.00%) of its original size
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Killing unit)))] Equal to 1
            Then - Actions
                Animation - Change (Killing unit)'s size to (50.00%, 50.00%, 50.00%) of its original size
            Else - Actions
                Do nothing
        -------- Dying Units --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Dying unit)))] Equal to 8
            Then - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Center of Regions[(Random integer number between 1 and 16)]) facing (Position of (Triggering unit))
                Animation - Change (Last created unit)'s size to (170.00%, 170.00%, 170.00%) of its original size
                Camera - Pan camera for (Owner of (Dying unit)) to (Position of (Last created unit)) over 2.00 seconds
                Player - Disable Change to Flamethrower  for (Owner of (Dying unit))
                Player - Disable Change to Ice Blaster  for (Owner of (Dying unit))
                Player - Disable Change to Lightning Energy Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Rocket Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Shrapnel Launcher  for (Owner of (Dying unit))
                Cinematic - Ping minimap for (All players) at (Position of (Dying unit)) for 3.00 seconds, using a Simple ping of color (30.00%, 30.00%, 30.00%)
                Special Effect - Create a special effect at (Position of (Dying unit)) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Unit - Remove (Dying unit) from the game
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Dying unit)))] Equal to 7
            Then - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Center of Regions[(Random integer number between 1 and 16)]) facing (Position of (Triggering unit))
                Animation - Change (Last created unit)'s size to (140.00%, 140.00%, 140.00%) of its original size
                Camera - Pan camera for (Owner of (Dying unit)) to (Position of (Last created unit)) over 2.00 seconds
                Player - Disable Change to Flamethrower  for (Owner of (Dying unit))
                Player - Disable Change to Ice Blaster  for (Owner of (Dying unit))
                Player - Disable Change to Lightning Energy Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Rocket Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Shrapnel Launcher  for (Owner of (Dying unit))
                Cinematic - Ping minimap for (All players) at (Position of (Dying unit)) for 3.00 seconds, using a Simple ping of color (30.00%, 30.00%, 30.00%)
                Special Effect - Create a special effect at (Position of (Dying unit)) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Unit - Remove (Dying unit) from the game
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Dying unit)))] Equal to 6
            Then - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Center of Regions[(Random integer number between 1 and 16)]) facing (Position of (Triggering unit))
                Animation - Change (Last created unit)'s size to (120.00%, 120.00%, 120.00%) of its original size
                Camera - Pan camera for (Owner of (Dying unit)) to (Position of (Last created unit)) over 2.00 seconds
                Player - Disable Change to Flamethrower  for (Owner of (Dying unit))
                Player - Disable Change to Ice Blaster  for (Owner of (Dying unit))
                Player - Disable Change to Lightning Energy Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Rocket Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Shrapnel Launcher  for (Owner of (Dying unit))
                Cinematic - Ping minimap for (All players) at (Position of (Dying unit)) for 3.00 seconds, using a Simple ping of color (30.00%, 30.00%, 30.00%)
                Special Effect - Create a special effect at (Position of (Dying unit)) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Unit - Remove (Dying unit) from the game
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Dying unit)))] Equal to 5
            Then - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Center of Regions[(Random integer number between 1 and 16)]) facing (Position of (Triggering unit))
                Animation - Change (Last created unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
                Camera - Pan camera for (Owner of (Dying unit)) to (Position of (Last created unit)) over 2.00 seconds
                Player - Disable Change to Flamethrower  for (Owner of (Dying unit))
                Player - Disable Change to Ice Blaster  for (Owner of (Dying unit))
                Player - Disable Change to Lightning Energy Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Rocket Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Shrapnel Launcher  for (Owner of (Dying unit))
                Cinematic - Ping minimap for (All players) at (Position of (Dying unit)) for 3.00 seconds, using a Simple ping of color (30.00%, 30.00%, 30.00%)
                Special Effect - Create a special effect at (Position of (Dying unit)) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Unit - Remove (Dying unit) from the game
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Dying unit)))] Equal to 4
            Then - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Center of Regions[(Random integer number between 1 and 16)]) facing (Position of (Triggering unit))
                Animation - Change (Last created unit)'s size to (88.00%, 88.00%, 88.00%) of its original size
                Camera - Pan camera for (Owner of (Dying unit)) to (Position of (Last created unit)) over 2.00 seconds
                Player - Disable Change to Flamethrower  for (Owner of (Dying unit))
                Player - Disable Change to Ice Blaster  for (Owner of (Dying unit))
                Player - Disable Change to Lightning Energy Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Rocket Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Shrapnel Launcher  for (Owner of (Dying unit))
                Cinematic - Ping minimap for (All players) at (Position of (Dying unit)) for 3.00 seconds, using a Simple ping of color (30.00%, 30.00%, 30.00%)
                Special Effect - Create a special effect at (Position of (Dying unit)) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Unit - Remove (Dying unit) from the game
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Dying unit)))] Equal to 3
            Then - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Center of Regions[(Random integer number between 1 and 16)]) facing (Position of (Triggering unit))
                Animation - Change (Last created unit)'s size to (76.00%, 76.00%, 76.00%) of its original size
                Camera - Pan camera for (Owner of (Dying unit)) to (Position of (Last created unit)) over 2.00 seconds
                Player - Disable Change to Flamethrower  for (Owner of (Dying unit))
                Player - Disable Change to Ice Blaster  for (Owner of (Dying unit))
                Player - Disable Change to Lightning Energy Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Rocket Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Shrapnel Launcher  for (Owner of (Dying unit))
                Cinematic - Ping minimap for (All players) at (Position of (Dying unit)) for 3.00 seconds, using a Simple ping of color (30.00%, 30.00%, 30.00%)
                Special Effect - Create a special effect at (Position of (Dying unit)) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Unit - Remove (Dying unit) from the game
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Dying unit)))] Equal to 2
            Then - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Center of Regions[(Random integer number between 1 and 16)]) facing (Position of (Triggering unit))
                Animation - Change (Last created unit)'s size to (64.00%, 64.00%, 64.00%) of its original size
                Camera - Pan camera for (Owner of (Dying unit)) to (Position of (Last created unit)) over 2.00 seconds
                Player - Disable Change to Flamethrower  for (Owner of (Dying unit))
                Player - Disable Change to Ice Blaster  for (Owner of (Dying unit))
                Player - Disable Change to Lightning Energy Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Rocket Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Shrapnel Launcher  for (Owner of (Dying unit))
                Cinematic - Ping minimap for (All players) at (Position of (Dying unit)) for 3.00 seconds, using a Simple ping of color (30.00%, 30.00%, 30.00%)
                Special Effect - Create a special effect at (Position of (Dying unit)) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Unit - Remove (Dying unit) from the game
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to True
                SM_Size[(Player number of (Owner of (Dying unit)))] Equal to 1
            Then - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Center of Regions[(Random integer number between 1 and 16)]) facing (Position of (Triggering unit))
                Animation - Change (Last created unit)'s size to (50.00%, 50.00%, 50.00%) of its original size
                Camera - Pan camera for (Owner of (Dying unit)) to (Position of (Last created unit)) over 2.00 seconds
                Player - Disable Change to Flamethrower  for (Owner of (Dying unit))
                Player - Disable Change to Ice Blaster  for (Owner of (Dying unit))
                Player - Disable Change to Lightning Energy Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Rocket Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Shrapnel Launcher  for (Owner of (Dying unit))
                Cinematic - Ping minimap for (All players) at (Position of (Dying unit)) for 3.00 seconds, using a Simple ping of color (30.00%, 30.00%, 30.00%)
                Special Effect - Create a special effect at (Position of (Dying unit)) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Unit - Remove (Dying unit) from the game
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Dying unit) is in SM_NotDefeated) Equal to False
                SM_Size[(Player number of (Owner of (Dying unit)))] Equal to 0
            Then - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at (Center of Regions[(Random integer number between 1 and 16)]) facing (Position of (Triggering unit))
                Animation - Change (Last created unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
                Unit Group - Remove (Dying unit) from SM_NotDefeated
                Camera - Pan camera for (Owner of (Dying unit)) to (Position of (Last created unit)) over 2.00 seconds
                Player - Disable Change to Flamethrower  for (Owner of (Dying unit))
                Player - Disable Change to Ice Blaster  for (Owner of (Dying unit))
                Player - Disable Change to Lightning Energy Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Rocket Launcher  for (Owner of (Dying unit))
                Player - Disable Change to Shrapnel Launcher  for (Owner of (Dying unit))
                Cinematic - Ping minimap for (All players) at (Position of (Dying unit)) for 3.00 seconds, using a Simple ping of color (30.00%, 30.00%, 30.00%)
                Special Effect - Create a special effect at (Position of (Dying unit)) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Unit - Remove (Dying unit) from the game
                Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[(Player number of (Owner of (Dying unit)))] + (Name of (Owner of (Dying unit)))) + |r has been ELIMINATED! This just means they can't win but can still help their ally to win!)
                Set SM_NumofElim = (SM_NumofElim + 1)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Numofplayers Equal to (SM_NumofElim + 1)
            Then - Actions
                Unit Group - Pick every unit in SM_NotDefeated and do (Actions)
                    Loop - Actions
                        Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[(Player number of (Owner of (Picked unit)))] + (Name of (Owner of (Picked unit)))) + |r has won!)
                Trigger - Turn off (This trigger)
                Trigger - Turn off SM Set Up Points <gen>
                Trigger - Turn on Setting Regions <gen>
                Multiboard - Show SM_Multiboard
            Else - Actions

Also if there is a shorter way of doing all that please just give me a bried explanation of how (you don't have to do it :P). Thanks
10-07-2004, 11:42 PM#9
Moose-Head_Man
..... i am never reading that much triger AHHHHHHHHHH
10-08-2004, 04:40 AM#10
Guest
What The Fuck!!!!!! Dude How Is That One Fucking Trigger Fuck Me Dead
10-08-2004, 04:57 AM#11
Rafael Br
I almost have got crazy for reading all that code, but I don't see anithing wrong, you could try removing the dying unit as the last action of the trigger, removing the unit that triggered the spell causes the other actions to be skipped sometimes, check all of your variables too,another trigger could be causing the problem.
I think I am worth of a rep point, reding all your immense code once, and once again now, and solving your problem on the first time...
EDIT: This thing is leaking more than 10 points each time it runs...
10-08-2004, 10:12 AM#12
Guest
Can Chryo give me reputation for being here reading all his stuff even tho i did nothing to help :god_help_us:
10-08-2004, 10:23 AM#13
Anitarf
You seem to be unfamiliar with the concepts of mathematical functions. The point is that a value can be a function of another value (or multiple other values). In your case, the size of the unit is a function of the score of the owner of the unit. The higher the score, the greater the size. Instead of doing things with a bunch of if-then-elses, you can simply determine the correct size of the unit with a mathematical function based on the score.

A simple linear approximation would be that unit size increases by 20% per score point. This function would look like this:

Code:
set tempInteger = 30 + ( SM_Size[(Player number of (Owner of (Killing unit)))] * 20 )
Animation - Change (Killing unit)'s size to (real(tempinteger)%, real(tempinteger)%, real(tempinteger)%) of its original size

This effectively replaces all those if-then-elses. But if-then-elses are not the only thing you can shorten. Whenever you do a lot of copy-pasting, it can probably be done simpler with loops. Let's take a look at a simple and obvious example from your triggers:

Code:
        Multiboard - Set the text for UberFlagBoard item in column 1, row 1 to |cffBBB135Team 1
        Multiboard - Set the text for UberFlagBoard item in column 1, row 2 to |cffBBB135Team 2
        Multiboard - Set the text for UberFlagBoard item in column 1, row 3 to |cffBBB135Team 3
        Multiboard - Set the text for UberFlagBoard item in column 1, row 4 to |cffBBB135Team 4
        Multiboard - Set the text for UberFlagBoard item in column 1, row 5 to |cffBBB135Team 5
        Multiboard - Set the text for UberFlagBoard item in column 1, row 6 to |cffBBB135Team 6

Here's a simpler version, using a loop and in the loop, referencing the loop integer (integer A) with functions (in this case, a very simple linear function, where the number of the row is equal to (integer A)):

Code:
  For each integer A from 1 to 6 do actions:
    loop - actions:
      Multiboard - Set the text for UberFlagBoard item in column 1, row (integer A) to "|cffBBB135Team " + string(integer A)
10-08-2004, 11:57 AM#14
Chryosmere
Thnx for the tips and everything.. I guess i'll have to redo the trigger if i can't find why it's not working. Oh well :P Thanks for reading it lol.
10-10-2004, 10:00 AM#15
Chryosmere
Code:
set tempInteger = 30 + ( SM_Size[(Player number of (Owner of (Killing unit)))] * 20 )
Animation - Change (Killing unit)'s size to (real(tempinteger)%, real(tempinteger)%, real(tempinteger)%) of its original size


What would you do for dying unit then? =\