Hey there,
i'm new at SC2 Mapster and to the Galaxy Editor. But I did quite a lot with the old Warcraft 3 World Edit.
Im not sure where to put this thread, but i hope the datasection is ok.
I would like to store all the damage dealt(relative to the units production cost) by a player to a specific player stored in a variable.
Until now i did this via Trigger:
But the trigger slows down the whole game when more than 30 units are fighting.
My next Idea was to store the all damage dealt by a player to a player in a specific structure(using Validators) and then refresh the variable every 5 seconds.
I thought about adding one behaveior-buff per damagepoint to a specific structure or to "share" the damage with that structure.
Since i'm all new to behaviors, effects and validators i hope you can help me with this or share another idea.
Using buff stacks to dictate damage taken is a bad idea. Stick to triggers and do them more efficiently. I advise letting this thread be moved to the triggers forum.
When you hit 10k buff stacks the lag is crippling even for a computer not made in the stone age.
But still the lag is unbearable. And i don't know a way using this Trigger more efficiently (I think the event is fired so often that itself causes the lag)
To avoid 10k Buffstacks, i could easily set the periodic checking event to half a second so there usally wouldn't be 10k buff stacks one one unit.
I thought about using the conjoined behaveior on a unit with 100k Life and then check the hitpoints periodically. But i'm not really familiar with this behaveior and I dont have a clue how it actually works(I know that some destructibles are using it). Any examples/suggestions?
Really, stick to the trigger method. Data will not do this well, and conjoined behaviors are really buggy (I have experience with them). For example, you can't have two units conjoined with different amounts of max health. I forget exactly, but I think it makes both have the same max health as the least one. Triggers are your only hope. Just try to speed up the trigger if you can.
For example, it might be faster to save (triggering player) -1 to a variable instead of doing the math twice (maybe, maybe not). It also might be faster to code the two conditions in galaxy yourself, because sometimes the built in GUI functions are more convoluted than necessary (e.g. the for loop).
Yeah, you were right. It wasn't direcly connected to this trigger. There was another trigger with "Environment - Player Any Player uses Effect xxx".
The effect triggered when a specicfic behavior has been removed(a stackable behavior), so when a unit died and it had about 50 behaviors the trigger just went nuts :D. I solved that with a simple validator.
EDIT: Nah, just when i tought i was done, i realized that wasn't the only couse. Its still lagging.
I attached the map, maybe someone can test it or has another idea.
Do you by any chance run the trigger debug window when you test for lag? A piece of advice: Don't do that! The trigger debug window is a major source of lag, especially with events for registering damage, which tend to trigger quite often.
Deactivate your trigger debugger or even try to upload the map privately and see, if it lags on battlenet.
Do you by any chance run the trigger debug window when you test for lag? A piece of advice: Don't do that! The trigger debug window is a major source of lag, especially with events for registering damage, which tend to trigger quite often.
Deactivate your trigger debugger or even try to upload the map privately and see, if it lags on battlenet.
Deactivate the debugger's bottom logging panel except for errors. Every update creates a lot of lag (especially before 1.5). So make sure that there don't appear any log messages, if you test for performance. Also, pre 1.5, every new log entry is creating a huge lag on each update. So if that list is filled and a new line appears, it creates even more lag than before.
The debugger's active tab should display the active threads or the activity. Everything with a lot of values displayed creates a big lag with every update. So variables and triggers is bad (especially triggers lags a lot).
If you use 1.5, the one with the code (last tab) is the fastest.
So, in general you can leave the debugger on, you just need to know which settings you need to use to have less debugger caused lags in your map.
Hey there, i'm new at SC2 Mapster and to the Galaxy Editor. But I did quite a lot with the old Warcraft 3 World Edit. Im not sure where to put this thread, but i hope the datasection is ok.
I would like to store all the damage dealt(relative to the units production cost) by a player to a specific player stored in a variable. Until now i did this via Trigger:
But the trigger slows down the whole game when more than 30 units are fighting. My next Idea was to store the all damage dealt by a player to a player in a specific structure(using Validators) and then refresh the variable every 5 seconds.
I thought about adding one behaveior-buff per damagepoint to a specific structure or to "share" the damage with that structure. Since i'm all new to behaviors, effects and validators i hope you can help me with this or share another idea.
Thanks Taldeen
Using buff stacks to dictate damage taken is a bad idea. Stick to triggers and do them more efficiently. I advise letting this thread be moved to the triggers forum.
When you hit 10k buff stacks the lag is crippling even for a computer not made in the stone age.
Looked into the Conjoined behaviour?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Hmm, the trigger runtime itself seems not to be that high. About 9 seconds of testing(about 80 Units fighting each other):
But still the lag is unbearable. And i don't know a way using this Trigger more efficiently (I think the event is fired so often that itself causes the lag)
To avoid 10k Buffstacks, i could easily set the periodic checking event to half a second so there usally wouldn't be 10k buff stacks one one unit.
I thought about using the conjoined behaveior on a unit with 100k Life and then check the hitpoints periodically. But i'm not really familiar with this behaveior and I dont have a clue how it actually works(I know that some destructibles are using it). Any examples/suggestions?
(Edit: The trigger forum would be ok too ;))
Really, stick to the trigger method. Data will not do this well, and conjoined behaviors are really buggy (I have experience with them). For example, you can't have two units conjoined with different amounts of max health. I forget exactly, but I think it makes both have the same max health as the least one. Triggers are your only hope. Just try to speed up the trigger if you can.
For example, it might be faster to save (triggering player) -1 to a variable instead of doing the math twice (maybe, maybe not). It also might be faster to code the two conditions in galaxy yourself, because sometimes the built in GUI functions are more convoluted than necessary (e.g. the for loop).
Okay then i guess it's better to move this thread to the triggersection.
I rewrote the Trigger in Galaxy, but it's not helping much, still the same Issues:
Any Ideas?
This runtime is NOTHING. I highly doubt its the trigger making your map lag.
Yeah, you were right. It wasn't direcly connected to this trigger. There was another trigger with "Environment - Player Any Player uses Effect xxx".
The effect triggered when a specicfic behavior has been removed(a stackable behavior), so when a unit died and it had about 50 behaviors the trigger just went nuts :D. I solved that with a simple validator.
EDIT: Nah, just when i tought i was done, i realized that wasn't the only couse. Its still lagging. I attached the map, maybe someone can test it or has another idea.
Do you by any chance run the trigger debug window when you test for lag? A piece of advice: Don't do that! The trigger debug window is a major source of lag, especially with events for registering damage, which tend to trigger quite often.
Deactivate your trigger debugger or even try to upload the map privately and see, if it lags on battlenet.
Deactivate the debugger's bottom logging panel except for errors. Every update creates a lot of lag (especially before 1.5). So make sure that there don't appear any log messages, if you test for performance. Also, pre 1.5, every new log entry is creating a huge lag on each update. So if that list is filled and a new line appears, it creates even more lag than before.
The debugger's active tab should display the active threads or the activity. Everything with a lot of values displayed creates a big lag with every update. So variables and triggers is bad (especially triggers lags a lot).
If you use 1.5, the one with the code (last tab) is the fastest.
So, in general you can leave the debugger on, you just need to know which settings you need to use to have less debugger caused lags in your map.
Jap, that was it! The Debugwindow the created a huge lagg. Now everything is running beautiful! Thanks a lot!