Damage dealt - exeed max hp?

X-maul

AKA: Demtrod
Reaction score
201
Damage displayed - exeed max hp?

I've created a trigger which should display the amount of damage a spell deals.
It works just fine, despite one thing: It does not display more than the max amount of hp. If I attack a unit with 35 hp with a spell dealing 80 damage it only displays 35, and not 80.
Code:
Ability damage
    Events
        Unit - Any Unit takes Fatal or Non-Fatal Spell damage (from Any effects)
    Local Variables
        Text tag1 = No Text Tag <Text Tag>
        Text tag1 2 = No Text Tag <Text Tag>
    Conditions
    Actions
        Text Tag - Create a text tag with the text (Text((Triggering damage amount)) with Normal decimal places (Do Not use delimiters, precision limits: 0 to 0)) for (Player group((Owner of (Damaging unit)))), using a font size of 22, at (Position of (Triggering unit)) and height offset 1.0, initially Visible, and fog of war enforcement set to false
        Text Tag - Set the velocity of (Last created text tag) to 0.1 coordinates per second at an angle of 35.0 degrees from horizontal
        Text Tag - Set Text color(s) for (Last created text tag) to (100%, 0%, 0%)
        Variable - Set Text tag1 = (Last created text tag)
        Text Tag - Create a text tag with the text (Text((Triggering damage amount)) with Normal decimal places (Do Not use delimiters, precision limits: 0 to 0)) for (Player group((Owner of (Triggering unit)))), using a font size of 22, at (Position of (Triggering unit)) and height offset 1.0, initially Visible, and fog of war enforcement set to false
        Text Tag - Set the velocity of (Last created text tag) to 0.1 coordinates per second at an angle of 35.0 degrees from horizontal
        Text Tag - Set Text color(s) for (Last created text tag) to (50%, 0%, 0%)
        Variable - Set Text tag1 2 = (Last created text tag)
        General - Wait 2.5 Game Time seconds
        Text Tag - Destroy Text tag1
        Text Tag - Destroy Text tag1 2
Does any of you guys know how to get it to display the damage the spell deals?
 

Dave312

Censored for your safe viewing
Reaction score
269
I took a look at this but wasn't able to find a way around it. It is possible the damage is automatically limited by the SC2 engine, and thus there would be no solution. May I ask what you need to know the total damage dealt for? I did notice a couple of functions that allowed you to calculate the damage that would be dealt by a particular weapon given certain criteria on the target unit. Would this allow you to create a workaround?
 

X-maul

AKA: Demtrod
Reaction score
201
I wan't a "system" which displays the damage dealt from spells - In my map only spells deals magic damage (which is because of spell damage increasing items) and I thought this would work, but it seems like it does only show the damage you can possibly deal on the specific unit at the specific moment. So it wont realy allow me to wprl around it, it seems.

Anyway thanks for your effort.

EDIT: as it seems we are the only two persons actually using the Galaxy Editor forum, I'm not able to +rep you that much (pretty sad to be honest).
 

Dave312

Censored for your safe viewing
Reaction score
269
I wan't a "system" which displays the damage dealt from spells - In my map only spells deals magic damage (which is because of spell damage increasing items) and I thought this would work, but it seems like it does only show the damage you can possibly deal on the specific unit at the specific moment. So it wont realy allow me to wprl around it, it seems.

Anyway thanks for your effort.
I can get things like cost to display through the data editor but unfortunately can't find a way to do it for damage.

EDIT: as it seems we are the only two persons actually using the Galaxy Editor forum, I'm not able to +rep you that much (pretty sad to be honest).
Don't worry about it. I have the same problem (regardless of which forum it is in) since I tend to get help from the same people. It is fairly quite around these parts. Siretu is sometimes around. Hopefully if we can build up a good tutorial database and get a few members projects going it will get a bit more lively.
 

X-maul

AKA: Demtrod
Reaction score
201
I can get things like cost to display through the data editor but unfortunately can't find a way to do it for damage.
Well, I'll have to do with this for now :) It's not a big deal anyway.

Don't worry about it. I have the same problem (regardless of which forum it is in) since I tend to get help from the same people. It is fairly quite around these parts. Siretu is sometimes around. Hopefully if we can build up a good tutorial database and get a few members projects going it will get a bit more lively.
Yes, hopefully when I get the hangs of the editor I would be able to assist with some tutorials as well.
I for one is at the moment strugling with abilities, and how to do AoE effects - which doesnt seem to be covered by any tutorial.

It's a very hard editor to get the hang of, if you havent done anything like it before.
 

Dave312

Censored for your safe viewing
Reaction score
269
I'll look into writing an AOE effect tutorial on the weekend. I have worked with them before so I should be able to do it without any issues.
 

X-maul

AKA: Demtrod
Reaction score
201
I'll look into writing an AOE effect tutorial on the weekend. I have worked with them before so I should be able to do it without any issues.
oh, that would be fantastic :) After that, you could maybe look into buffs / debuffs?
Any way, I could keep suggestions streaming from now till the end of time - good to have someone like you on the forum :thup:
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I assume you're doing the damage through the data editor because if you did it with triggers you could just display the text tag in your damage trigger.

I will have a look around in the editor to see what I can find. When it comes to buffs / debuffs, I could probably write a tutorial on that. I think I am confident enough in the subject.

Also: I check this forum quite often but I don't reply if I don't feel I have something valuable to add.
 

X-maul

AKA: Demtrod
Reaction score
201
I assume you're doing the damage through the data editor because if you did it with triggers you could just display the text tag in your damage trigger.
I'm using the data editor, so for now I'll just stick with it as it is, I just thought it was something obvious I was missing.
I will have a look around in the editor to see what I can find. When it comes to buffs / debuffs, I could probably write a tutorial on that. I think I am confident enough in the subject.
Thanks a lot :) will help noobs like myself getting the hang of the editor, as it is especially the data editor which is a mystery to me at the moment.
Also: I check this forum quite often but I don't reply if I don't feel I have something valuable to add.
yea, same with me. I'm just asking the questions instead:)P), I don't see any reason to try to ansver if I don't know the ansver.
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
Theres two ways i can think of right now if theres no obvious route.

1. Use if/then/elses to seperate each effect. If theres not many effects, this would be an alright route, but if theres alot, then this just wouldnt work well.

2. Add a behavior to the spell, that is hidden, and the count is the amount of damage the spell does. Then you just take the amount of stacks the behavior has, which would translate as damage.

So for example, Your spell does 50 damage. The behavior would then have 50 stacks. The trigger then reads this 50 stacks, and displays it, looking like its actually displaying the damage.
 

X-maul

AKA: Demtrod
Reaction score
201
hmm, well yeah - if there wasnt the bonus spell damage attribute, then it would be a good solution, but I dont see how it could solve it, as it would again show inaccurate numbers :) thanks for your effort, but I'll just stick to it as it is.
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
Well the spell damage attribute would be easy. You would make a real variable - add the base attribute, and add any extra bonuses say from items or abilities, and then add the % to the text trigger.

So if the behavior was at 50 stacks, and you had a base 5% increase in spell damage, and an extra 3% from whatever, the trigger would be
...create Text{([Behavior Count])+(([Behavior Count]/100)*(Spell Attribute %))}
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
uhmmm you can make every armor type value a base of 99% damage reduction (with the .00 as your damage reduction; IE: 50% normal reduction = 99.50% reduction) then deal damage equal to 99x damage dealt and set the string displayed to 100x the damage dealt, that way any killing blows would have to be more than 100x the current health of the unit to glitch like that, it is possible to get this and you could get this method all the way down to 1/1000, how high of a factor you need would be dependant on the max damage of the strongest unit in your game in relation to having 1 health point left ie: a unit has 1 point left, you reduce 800 damage by 1000 (99.900% reduction), you still deal 0.8 damage, the unit is still alive, then your trigger deals the rest

make sure to add in the line
Trigger - turn off this trigger
before you deal the damage (or it will trigger itself)
and then
Trigger - turn on this trigger
right after (so you dont only get to see 1 damage string dur)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top