1.2 appears to have changed the functionality of the "Make Unit Take No Damage" trigger action.
I used triggers to create a custom "armor" system that used shields as a FPS style armor where it absorbs some of the incoming damage, but not all of it. Think of armor in Quake or Counter-Strike. An example can be downloaded from my maps section here on SC2Mapster.
The basic idea behind it was, simplified here:
Trigger: PrepareCreatedUnits
Event: (Any unit) is created
Trigger: Make (last created unit) take no damage
Trigger: ConvertDamage
Event: (Any unit) takes damage from (any effect)
Action: <Some math that calculates how much damage should be applied to the "armor" and life>
That was working fine, but after patch 1.2 it is broken. Nothing will take any damage from anything.
Hypothesis
My hypothesis is that they changed the order of evaluation on the trigger.
Before
Unit that has been modified by the "take no damage" trigger action is hit with a damage effect
Trigger event "unit takes damage" (<- this is where my ConvertDamage trigger would run, since the event was triggered)
Cancel damage effect on the unit, since it was modified to "take no damage"
After (I think they reversed #2 and #3)
Unit that has been modified by the "take no damage" trigger action is hit with a damage effect
Cancel damage effect on the unit, since it was modified to "take no damage"
Trigger event "unit takes damage" (<- since the "take no damage" cancelled the effect damage, my ConvertDamage trigger now runs with 0 incoming damage, thus totally breaking the functionality)
Wrap-up
Has anyone else experienced any issues with this trigger action, "make unit take no damage", since the new 1.2 patch?
Does anyone have any other theories for why it is now broken?
Can anyone recommend an alternative method since this doesn't work any longer?
why dont you just use a damage reduction behavior ... and make it use charges.... so it can run out... if thats what you want.... then you could make it so it periodically gets charges back
really shouldnt be using triggers for anything damage related cause it will lag like hell when theres alot of shit going on
Because what you're describing does not fit my requirements.
It worked fine prior to patch 1.2, without any lag.
With recoloring and editing of the text, it literally shows Armor: #/# and Life: #/# on the unit, instead of shields, and it displays the armor as a status bar (also recolored) above the unit, which I like.
Ideally I could simply have some sort of way to specify "% of damage that pierces shield" and be done with it in Data, but if I recall the only setting is 100% or nothing.
Because what you're describing does not fit my requirements.
It worked fine prior to patch 1.2, without any lag.
With recoloring and editing of the text, it literally shows Armor: #/#
and Life: #/# on the unit, instead of shields, and it displays the armor
as a status bar (also recolored) above the unit, which I like.
Ideally I could simply have some sort of way to specify "% of damage
that pierces shield" and be done with it in Data, but if I recall the
only setting is 100% or nothing.
Ah you mean your trying to use ... shields like they are armor...
I dunno man why dont you just control all damage by triggers.....
so you set your units weapons effect to do 0 damage then when he attacks you have a trigger like this
convert gamelink to string(triggering effect) = PlayersWeaponDamage[p,i,0]
then
set TempDamage = PlayersWeaponDamage[p,i,1]
set i = 99
Set units shield = ((damaged Unit's current shield) - (convert real to int((convert Int to real(TempDamage) * (1 / 3)))
Set units health = ((damaged Unit's current health) - (convert real to int((convert Int to real(TempDamage)) * (2 / 3)))
this way you dont rely at all on what the weapons actuall damage effect is...... since your already running triggers every time your units attack and it doesnt seem to bother you .... why not handle all damage this way
Because this system handles dozens of different damage effects, ranging from weapons to spells. I don't want to have to edit them all to 0 and then have to store dozens of damage numbers, and a ton of if-else's to apply the right amount of damage, especially when you start to consider upgrades.
Because this system handles dozens of different damage effects, ranging
from weapons to spells. I don't want to have to edit them all to 0 and
then have to store dozens of damage numbers, and a ton of if-else's to
apply the right amount of damage, especially when you start to consider
upgrades.
Its called.... use an array and switch statements.... it would deffinately work. If you made one array that had the name of the damage effects in it you could
pull the damage value out of your array and use that damage
use the name of the damage effect from the array and at run time use a "set catalog field value" to set the damage effect's "damage field value" equal to zero. so you woulnd actually have to edit the data at all to do it.
work smarter not harder
Ill edit my above post to something similiar to what im talking about
the problem is your fighting the way SC2 handles damage
Shields really arnt armor they are a temporary secondary HP bar
Are you creating them on the "map initialized" event? if so that would more then likely be your problem
Does 1.2 modify anything about initialization creations ?
Because the oddest thing is that it's random. I change the label, the portrait dont work. I change it back, portrait works. I change it again, the portrait works. Strange.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Explanation
1.2 appears to have changed the functionality of the "Make Unit Take No Damage" trigger action.
I used triggers to create a custom "armor" system that used shields as a FPS style armor where it absorbs some of the incoming damage, but not all of it. Think of armor in Quake or Counter-Strike. An example can be downloaded from my maps section here on SC2Mapster.
The basic idea behind it was, simplified here:
Trigger: PrepareCreatedUnits
Trigger: ConvertDamage
That was working fine, but after patch 1.2 it is broken. Nothing will take any damage from anything.
Hypothesis
My hypothesis is that they changed the order of evaluation on the trigger.
Before
After (I think they reversed #2 and #3)
Wrap-up
Thanks!
why dont you just use a damage reduction behavior ... and make it use charges.... so it can run out... if thats what you want.... then you could make it so it periodically gets charges back
really shouldnt be using triggers for anything damage related cause it will lag like hell when theres alot of shit going on
@SouLCarveRR: Go
Because what you're describing does not fit my requirements.
It worked fine prior to patch 1.2, without any lag.
With recoloring and editing of the text, it literally shows Armor: #/# and Life: #/# on the unit, instead of shields, and it displays the armor as a status bar (also recolored) above the unit, which I like.
Ideally I could simply have some sort of way to specify "% of damage that pierces shield" and be done with it in Data, but if I recall the only setting is 100% or nothing.
Ah you mean your trying to use ... shields like they are armor...
I dunno man why dont you just control all damage by triggers.....
so you set your units weapons effect to do 0 damage then when he attacks you have a trigger like this
Global Variable
this way you dont rely at all on what the weapons actuall damage effect is...... since your already running triggers every time your units attack and it doesnt seem to bother you .... why not handle all damage this way
@SouLCarveRR: Go
Because this system handles dozens of different damage effects, ranging from weapons to spells. I don't want to have to edit them all to 0 and then have to store dozens of damage numbers, and a ton of if-else's to apply the right amount of damage, especially when you start to consider upgrades.
Its called.... use an array and switch statements.... it would deffinately work. If you made one array that had the name of the damage effects in it you could
work smarter not harder
Ill edit my above post to something similiar to what im talking about
the problem is your fighting the way SC2 handles damage
Shields really arnt armor they are a temporary secondary HP bar
Then if a player buys upgrades you just update the value on the array.....
I spose you lose your tool tips and such this way ... but your already fighting how the damage system works....
but in regards to your questions regard the actuall triggers your currently using.....
do you know if your "unit takes damage" event even fires .... when you have the unit set not to take damage?
@SouLCarveRR: Go
No, that is a good question and I will test it when I get home.
if not you could try "any damage" or "non-lethal" damage....
or you could give the unit a behavior that reduces incoming damage by 100%.
To respond the original thread question, I have problems with Cinematic portraits and Dialog labels. Odd
@Yaos01: Go
Are you creating them on the "map initialized" event? if so that would more then likely be your problem
@scmapcritic: Go
Ok, just threw in some debug messages.
Events
Local Variables
Actions
This outputs: "Just took damage of 0" for everything. This supports my hypothesis in the first post.
Does 1.2 modify anything about initialization creations ? Because the oddest thing is that it's random. I change the label, the portrait dont work. I change it back, portrait works. I change it again, the portrait works. Strange.