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)
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.
Hello well .... Theres alot of things in the game that are units but you prolly dont think of them as units. Such as missiles and stuff.
I would suggest putting in a debugger statement on the first action line of the trigger
Text Messsage (convert (game link to string (type of unit(triggering unit)))
This will tell you all the units your trigger is picking up on. Adding additional conditions to the Events Conditions will help reduce lag greatly. Possibly try.
Owner of (killing unit) != 15
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
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!
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))
This is probably irrelevant to your problem, but what is this line right here doing? Why do you add the same value together twice?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
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
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!
@Bladien: Go
Hello well .... Theres alot of things in the game that are units but you prolly dont think of them as units. Such as missiles and stuff.
I would suggest putting in a debugger statement on the first action line of the trigger
Text Messsage (convert (game link to string (type of unit(triggering unit)))
This will tell you all the units your trigger is picking up on. Adding additional conditions to the Events Conditions will help reduce lag greatly. Possibly try. Owner of (killing unit) != 15
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!
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))
This is probably irrelevant to your problem, but what is this line right here doing? Why do you add the same value together twice?