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 The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      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