• 0

    posted a message on Help with Trigger that Updates Scoreboard(Kills and Score)

    Thank you for the reply SouLCarveRR

    I followed your suggestions and the only Units that are triggering it are the proper Enemy units for the level

    From looking at the Trigger Debugger it seems as if it firing more than just when a Unit dies, but everytime damage is dealt as well. :(

    Here is the updated Trigger...below I also put part of the Trigger Debugger log so you can see what I mean. The Broodlings are the Enemy units for Level 1. The Marines/Medic are the Defender's units.

    Thanks again any other suggestions/help would be greatly appreciated!

    Enemy Unit Dies
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
            (Owner of (Triggering unit)) == 15
            (Owner of (Killing unit)) != 15
            (Triggering death type is Normal) == true
        Actions
            Debug - Display (Game text for (String((Unit type of (Triggering unit))))) as debug output using Type 1, and Do display it in the game window
            Variable - Modify Player Kills Count[(Killing player)]: + 1
            Leaderboard - Set Leaderboard item text at column 2 and row ((Killing player) + 1) to (Text(Player Kills Count[(Killing player)]))
            Variable - Set Player Score Count[(Killing player)] = ((Player (Killing player) Point Value of Units Killed score) + (Player (Killing player) Point Value of Units Killed score))
            Leaderboard - Set Leaderboard item text at column 3 and row ((Killing player) + 1) to (Text(Player Score Count[(Killing player)]) with Any Precision decimal places)
    
    00:00:15.82 Event: Unit Damaged/Died (Broodling, 0.0683) triggered gt_EnemyUnitDies_Func
    00:00:15.82 Broodling
    00:00:15.82 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.0683))
    00:00:15.91 Event: Unit Damaged/Died (Broodling, 0.2392) triggered gt_EnemyUnitDies_Func
    00:00:15.91 Broodling
    00:00:15.91 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.2392))
    00:00:16.44 Event: Unit Damaged/Died (Broodling, 0.171) triggered gt_EnemyUnitDies_Func
    00:00:16.44 Broodling
    00:00:16.44 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.171))
    00:00:16.66 Event: Unit Damaged/Died (Broodling, 0.2392) triggered gt_EnemyUnitDies_Func
    00:00:16.66 Broodling
    00:00:16.66 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.2392))
    00:00:16.75 Event: Unit Damaged/Died (Broodling, 0.1025) triggered gt_EnemyUnitDies_Func
    00:00:16.75 Broodling
    00:00:16.75 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.1025))
    00:00:16.93 Event: Unit Damaged/Died (Broodling, 0.3247) triggered gt_EnemyUnitDies_Func
    00:00:16.93 Broodling
    00:00:16.93 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.3247))
    00:00:17.15 Event: Unit Damaged/Died (Broodling, 0.205) triggered gt_EnemyUnitDies_Func
    00:00:17.15 Broodling
    00:00:17.15 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.205))
    00:00:17.24 Event: Unit Damaged/Died (Broodling, 0.0512) triggered gt_EnemyUnitDies_Func
    00:00:17.24 Broodling
    00:00:17.24 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.0512))
    00:00:17.60 Event: Unit Damaged/Died (Broodling, 0.4443) triggered gt_EnemyUnitDies_Func
    00:00:17.60 Broodling
    00:00:17.60 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.4443))
    00:00:17.77 Event: Unit Damaged/Died (Broodling, 0.2563) triggered gt_EnemyUnitDies_Func
    00:00:17.77 Broodling
    00:00:17.77 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.2563))
    00:00:18.48 Event: Unit Damaged/Died (Broodling, 5.2734) triggered gt_EnemyUnitDies_Func
    00:00:18.48 Broodling
    00:00:18.48 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 5.2734))
    00:00:18.57 Event: Unit Damaged/Died (Broodling, 0.4101) triggered gt_EnemyUnitDies_Func
    00:00:18.57 Broodling
    00:00:18.57 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.4101))
    00:00:18.62 Event: Unit Damaged/Died (Broodling, 0.4785) triggered gt_EnemyUnitDies_Func
    00:00:18.62 Broodling
    00:00:18.62 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.4785))
    00:00:18.66 Event: Unit Damaged/Died (Broodling, 0.4785) triggered gt_EnemyUnitDies_Func
    00:00:18.66 Broodling
    00:00:18.66 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.4785))
    00:00:19.02 Event: Unit Damaged/Died (Broodling, 0.4956) triggered gt_EnemyUnitDies_Func
    00:00:19.02 Broodling
    00:00:19.02 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.4956))
    00:00:19.11 Event: Unit Damaged/Died (Marine, 4.0722) triggered gt_EnemyUnitDies_Func
    00:00:19.77 Event: Unit Damaged/Died (Marine, 15) triggered gt_EnemyUnitDies_Func
    00:00:19.82 Event: Unit Damaged/Died (Broodling, 0.7348) triggered gt_EnemyUnitDies_Func
    00:00:19.82 Broodling
    00:00:19.82 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.7348))
    00:00:19.95 Event: Unit Damaged/Died (Broodling, 1.0083) triggered gt_EnemyUnitDies_Func
    00:00:19.95 Broodling
    00:00:19.95 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 1.0083))
    00:00:19.95 Event: Unit Damaged/Died (Broodling, 0.5981) triggered gt_EnemyUnitDies_Func
    00:00:19.95 Broodling
    00:00:19.95 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.5981))
    00:00:19.100 Event: Unit Damaged/Died (Broodling, 0.4785) triggered gt_EnemyUnitDies_Func
    00:00:19.100 Broodling
    00:00:19.100 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.4785))
    00:00:19.100 Event: Unit Damaged/Died (Broodling, 5.3417) triggered gt_EnemyUnitDies_Func
    00:00:19.100 Broodling
    00:00:19.100 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 5.3417))
    00:00:20.04 Event: Unit Damaged/Died (Marine, 8.0473) triggered gt_EnemyUnitDies_Func
    00:00:20.13 Event: Unit Damaged/Died (Broodling, 0.7177) triggered gt_EnemyUnitDies_Func
    00:00:20.13 Broodling
    00:00:20.13 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.7177))
    00:00:20.48 Event: Unit Damaged/Died (Marine, 15) triggered gt_EnemyUnitDies_Func
    00:00:20.48 Event: Unit Damaged/Died (Broodling, 0.9912) triggered gt_EnemyUnitDies_Func
    00:00:20.48 Broodling
    00:00:20.48 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.9912))
    00:00:20.71 Event: Unit Damaged/Died (Broodling, 1.0253) triggered gt_EnemyUnitDies_Func
    00:00:20.71 Broodling
    00:00:20.71 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 1.0253))
    00:00:20.84 Event: Unit Damaged/Died (Broodling, 1.316) triggered gt_EnemyUnitDies_Func
    00:00:20.84 Broodling
    00:00:20.84 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 1.316))
    00:00:21.06 Event: Unit Damaged/Died (Broodling, 10.957) triggered gt_EnemyUnitDies_Func
    00:00:21.11 Event: Unit Damaged/Died (Marine, 15) triggered gt_EnemyUnitDies_Func
    00:00:21.28 Event: Unit Damaged/Died (Medic, 9.3076) triggered gt_EnemyUnitDies_Func
    00:00:21.77 Event: Unit Damaged/Died (Marine, 15) triggered gt_EnemyUnitDies_Func
    00:00:21.82 Event: Unit Damaged/Died (Broodling, 1.0083) triggered gt_EnemyUnitDies_Func
    00:00:21.82 Broodling
    00:00:21.82 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 1.0083))
    00:00:21.82 Event: Unit Damaged/Died (Broodling, 1.0083) triggered gt_EnemyUnitDies_Func
    00:00:21.82 Broodling
    00:00:21.82 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 1.0083))
    00:00:21.86 Event: Unit Damaged/Died (Marine, 14.6264) triggered gt_EnemyUnitDies_Func
    00:00:21.86 Event: Unit Damaged/Died (Broodling, 0.974) triggered gt_EnemyUnitDies_Func
    00:00:21.86 Broodling
    00:00:21.86 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.974))
    00:00:22.08 Event: Unit Damaged/Died (Marine, 15) triggered gt_EnemyUnitDies_Func
    00:00:22.17 Event: Unit Damaged/Died (Broodling, 0.6835) triggered gt_EnemyUnitDies_Func
    00:00:22.17 Broodling
    00:00:22.17 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.6835))
    00:00:22.48 Event: Unit Damaged/Died (Broodling, 0.9057) triggered gt_EnemyUnitDies_Func
    00:00:22.48 Broodling
    00:00:22.48 Running gt_EnemyUnitDies_Func (Event: Unit Damaged/Died (Broodling, 0.9057))
    00:00:22.66 Event: Unit Damaged/Died (Marine, 8.0473) triggered gt_EnemyUnitDies_Func
    
    Posted in: Triggers
  • 0

    posted a message on Help with Trigger that Updates Scoreboard(Kills and Score)

    I am making a Defense Map that keeps track of each Player's Kills and their Total Score for all Units that they have killed. I am making good progress but this trigger has had me stuck for several weeks. Basically, when a Level starts and the Enemy units start engaging the defenders, the map starts lagging extremely bad for a little bit, which makes the fights no fun at all(Defenders can have anywhere from 5-25 units typically when the Level starts, and the Enemies have 3 spawn points where 30 enemy units come from, so 90 enemy units in total). I have narrowed it down to this trigger right here.

    Any assistance would be greatly appreciated! I know there is probably tons of different ways to Optimize/Make this trigger better! (Player 15 is the Enemy in my map)

    Thanks in advance

    Enemy Unit Dies
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
            (Owner of (Triggering unit)) == 15
        Actions
            Variable - Modify Player Kills Count[(Killing player)]: + 1
            Leaderboard - Set Leaderboard item text at column 2 and row ((Killing player) + 1) to (Text(Player Kills Count[(Killing player)]))
            Variable - Set Player Score Count[(Killing player)] = ((Player (Killing player) Point Value of Units Killed score) + (Player (Killing player) Point Value of Units Killed score))
            Leaderboard - Set Leaderboard item text at column 3 and row ((Killing player) + 1) to (Text(Player Score Count[(Killing player)]) with Any Precision decimal places)
    

    While watching the Trigger Debugger when the lag starts, this Trigger goes off like crazy, it seems to go off not only when a Unit is killed, but when a Unit is damaged as well. It seems like I need to make the Event more specific, I just don't know how, I have tried learning Presets/Functions, but still have difficulty completely wrapping my head around it.

    Thanks again in advance!

    Posted in: Triggers
  • 0

    posted a message on Help with Event/Trigger(Any Unit Dies)

    Sorry for the delay on an update...work been bogging me down

    I tried setting up the trigger how you suggested but I am getting errors unfortunately :/

    Any help would be greatly appreciated...This issue has made me start to lose interest because I have tried so many ways of doing this.. I really wish I could wrap my head around Functions/Presets if they would help in this case

    Here is a snip of the trigger debuggger when this happens...It just seems like this event is firing way more than it should, and I am getting an array index overflow error as well.... at the bottom I will post the new trigger that is setup

    00:00:35.72 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Marine, 15))
    00:00:35.86 Event: Unit Damaged/Died (Broodling, 0.957) triggered gt_EnemyUnitDiesTest_Func
    00:00:35.86 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 0.957))
    00:00:35.99 Event: Unit Damaged/Died (Hydralisk, 5.8715) triggered gt_EnemyUnitDiesTest_Func
    00:00:35.99 Trigger Error in 'gt_EnemyUnitDiesTest_Func': An error occurred starting StarCraft II.  Please try again.e_arrayIndexOverflow
    00:00:35.99 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Hydralisk, 5.8715))
    00:00:36.08 Event: Timer (9, Periodic: 1) triggered gt_MarineSpawnerStartSpawning_Func
    00:00:36.08 Running gt_MarineSpawnerStartSpawning_Func (Event: Timer (9, Periodic: 1))
    00:00:36.12 Event: Unit Damaged/Died (Broodling, 2.9443) triggered gt_EnemyUnitDiesTest_Func
    00:00:36.12 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 2.9443))
    00:00:36.12 Event: Timer (12, Periodic: 1) triggered gt_UltraliskSpawnerStartSpawning_Func
    00:00:36.12 Running gt_UltraliskSpawnerStartSpawning_Func (Event: Timer (12, Periodic: 1))
    00:00:36.52 Event: Unit Damaged/Died (Broodling, 25.8544) triggered gt_EnemyUnitDiesTest_Func
    00:00:36.52 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 25.8544))
    00:00:36.57 Event: Unit Damaged/Died (Broodling, 15.4443) triggered gt_EnemyUnitDiesTest_Func
    00:00:36.57 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 15.4443))
    00:00:36.79 Event: Unit Damaged/Died (Broodling, 2.2583) triggered gt_EnemyUnitDiesTest_Func
    00:00:36.79 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 2.2583))
    00:00:36.79 Event: Unit Damaged/Died (Broodling, 11.9531) triggered gt_EnemyUnitDiesTest_Func
    00:00:36.79 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 11.9531))
    00:00:36.84 Event: Unit Damaged/Died (Marine, 15) triggered gt_EnemyUnitDiesTest_Func
    00:00:36.84 Trigger Error in 'gt_EnemyUnitDiesTest_Func': An error occurred starting StarCraft II.  Please try again.e_arrayIndexOverflow
    00:00:36.84 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Marine, 15))
    00:00:36.84 Event: Unit Damaged/Died (Broodling, 25.4101) triggered gt_EnemyUnitDiesTest_Func
    00:00:36.84 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 25.4101))
    00:00:37.01 Event: Unit Damaged/Died (Broodling, 6.1303) triggered gt_EnemyUnitDiesTest_Func
    00:00:37.01 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 6.1303))
    00:00:37.06 Event: Unit Damaged/Died (Archon, 15) triggered gt_EnemyUnitDiesTest_Func
    00:00:37.06 Trigger Error in 'gt_EnemyUnitDiesTest_Func': An error occurred starting StarCraft II.  Please try again.e_arrayIndexOverflow
    00:00:37.06 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Archon, 15))
    00:00:37.06 Event: Unit Damaged/Died (Broodling, 10.4785) triggered gt_EnemyUnitDiesTest_Func
    00:00:37.06 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 10.4785))
    00:00:37.68 Event: Unit Damaged/Died (Broodling, 34.8852) triggered gt_EnemyUnitDiesTest_Func
    00:00:37.68 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 34.8852))
    00:00:37.81 Event: Unit Damaged/Died (Broodling, 25.4272) triggered gt_EnemyUnitDiesTest_Func
    00:00:37.81 Running gt_EnemyUnitDiesTest_Func (Event: Unit Damaged/Died (Broodling, 25.4272))
    
    Enemy Unit Dies Test
        Events
            Unit - Any Unit dies
        Local Variables
            Killer = (Killing player) <Integer>
            Chooser = (Player Score Count[Killer] / 50000) <Integer>
        Conditions
            (Owner of (Triggering unit)) == 15
        Actions
            Variable - Modify Killer: + 1
            Leaderboard - Set Leaderboard item text at column 2 and row (Killer + 1) to (Text(Player Kills Count[Killer]))
            Variable - Set Player Score Count[Killer] = ((Player Killer Point Value of Units Killed score) + (Player Killer Point Value of Units Killed score))
            Leaderboard - Set Leaderboard item text at column 3 and row (Killer + 1) to (Text(Player Score Count[Killer]))
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Player Score Count[Killer] != Chooser
                    Chooser <= 10
                Then
                    Variable - Set Player - New Unit Chooser[Killer] = Chooser
                    Unit - Create 1 Unit / Power Selector for player Killer at Unit / Power Selector Starting Point facing 180.0 degrees (No Options)
                    UI - Display "Congratulations! You just received ..." for (Player group(Killer)) to Subtitle area
                Else
    
    Posted in: Triggers
  • 0

    posted a message on Help with Event/Trigger(Any Unit Dies)

    Thank you for the quick reply, I will definitely give this a shot and report back....

    I had it setup originally without the Add Actions to Action Queue :/ that was one of my last efforts to try and optimize unfortunately :/ lol

    Posted in: Triggers
  • 0

    posted a message on Help with Event/Trigger(Any Unit Dies)

    I am making a defense map that keeps track of Kills/Score. When I start the first Level, as soon as the enemy units engage my units the game gets extremely laggy and choppy.

    Using the trigger debugger I have narrowed it down to my Trigger that updates the Leaderboard Kills/Score every time a Unit Dies.

    When watching the trigger debugger, the Trigger seems to be firing before units are dieing(I also noticed it says Event: Unit damaged/dies instead of just Event: Unit Dies when this happenes. It is firing every time any unit is damaged and any time any unit is dies.

    I am guessing I need to be more specific with the Event so that it does not fire so often, right now it is Unit - Any Unit dies, but it also has several If statements for rewarding a new Unit every 50,000 score.

    I have tried to get the trigger to only fire if a Unit owned by Player 15 dies(who is the Enemy in my map) but have been so far unsuccessful, I have a lot of the rest of my map finished but this issue is preventing me from moving on and have spent hours upon hours trying to resolve this. Any help would be so much appreciated :D

    I still have not gotten down the concept of making Presets/or Functions and I am sure those would help big time for this trigger. Thanks again in advance. Here is the whole trigger(minus about 10 more of the If statements for Unit Reward so it doesnt make this post 3 pages LOL) so you can see :D

    Enemy Unit Dies
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
            (Owner of (Triggering unit)) == 15
        Actions
            Trigger - Add (Actions) to the action queue
                Actions
                    Variable - Modify Player Kills Count[(Killing player)]: + 1
                    Leaderboard - Set Leaderboard item text at column 2 and row ((Killing player) + 1) to (Text(Player Kills Count[(Killing player)]))
                    Variable - Set Player Score Count[(Killing player)] = ((Player (Killing player) Point Value of Units Killed score) + (Player (Killing player) Point Value of Units Killed score))
                    Leaderboard - Set Leaderboard item text at column 3 and row ((Killing player) + 1) to (Text(Player Score Count[(Killing player)]) with Any Precision decimal places)
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Player Score Count[(Killing player)] >= 50000.0
                            Player Score Count[(Killing player)] <= 99999.0
                            Player - New Unit Chooser[(Killing player)] == 0
                        Then
                            Unit - Create 1 Unit / Power Selector for player (Killing player) at Unit / Power Selector Starting Point facing 180.0 degrees (No Options)
                            UI - Create a Trigger alert at Unit / Power Selector Starting Point for player 1 with the text: "You just received another Unit / Po..." (Custom icon: No File)
                            Variable - Set Player - New Unit Chooser[(Killing player)] = 1
                            UI - Display "Congratulations! You just received ..." for (Player group((Killing player))) to Subtitle area
                        Else
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Player Score Count[(Killing player)] >= 100000.0
                            Player Score Count[(Killing player)] <= 149999.0
                            Player - New Unit Chooser[(Killing player)] == 1
                        Then
                            Unit - Create 1 Unit / Power Selector for player (Killing player) at Unit / Power Selector Starting Point facing 180.0 degrees (No Options)
                            Variable - Set Player - New Unit Chooser[(Killing player)] = 2
                            UI - Display "Congratulations! You just received ..." for (Player group((Killing player))) to Subtitle area
                        Else
    
    Posted in: Triggers
  • To post a comment, please or register a new account.