A good and efficient way to deal damage with triggers?

X-maul

AKA: Demtrod
I was considering picking up a map I once worked on, which included hero units with upgradeable abilities, which also dealt damage acording to the items the unit had.

The way it worked was that the ability deals 100 damage + 0.1*Strength. I made an attribute behavior (not sure it's the right name) for the Strength stat, and set a variable to the amout of behaviors (which worked).

I then made the ability deal 100 damage (with effects), and a trigger that launched every time the effect fired, and dealt the damage acording the variable.

My question now is, is this the most efficient way? I could imagine that doing this with an ability that deals area of effect damage multiple times a second in a large area, it would end up causing lag. Is there a more efficient way to do this?

I was considering having 2 effects that deals damage, end then setting the damage field of the behavior to my desired amount, but is there a more efficient way to deal bonus damage according to a attribute behavior?
 

Glorn2

Slap n' Tickle
Again late, but it would seem as though you are overlooking the fact that you can use attributes and buffs to increase damage by a % as it stands. you can set it so a point of "intelligence" increases spell damage by 1%, or strength increases physical damage by 1%. Really, you can turn any aspect of a unit into a stat point. The same concept works for items; you can create an item which increases spell damage by 20%. The problem then I guess is if you dont want spell damage % increase from intelligence and spell damange increase from % items to stack multiplivity, but additivly. It would be an irritating amount of work for such a small change though.
 

X-maul

AKA: Demtrod
Well, yea that would work if it was a flat increase; increase all spell damage by 10%. As an example, I want a unit with an ability that deals 20% spell power on impact and then 5% spell power every second for 5 seconds.

As far as I know, this can't be done with your approach, the way I'm doing it now, is to have a trigger, which activates every time a unit has an attribute change, then I change the effect of the unit to match (setting DAMAGE to 10% of spell power for triggering unit). This works okay for now, though it would be better to be able to use an already made system.
 

Glorn2

Slap n' Tickle
Ahh, yeah, I see your issue. I encountered that on a project I created years ago; DoT abilities would become OP compared to single target abilities.
Another way to do it through data (may be painful) would be to have each damage effect apply a damage response buff to the unit, which has 1 charge and expires when used. You could use the damage response buff to add "spell damage reduction" to the unit being hit, for that hit. IT would allow you to reduce the damage of one effect by 80%, and another by 95%, to get your desired 20% and 5%.

A triggered system doesn't cause you any lag in a big team team, using AoE spells?
 

X-maul

AKA: Demtrod
Haven't tested out the data approach you're suggesting, but I like to also be able to display in my tooltips that the ability deals 100 impact damage and 50 damage every second, so I might stick with my current method, nice idea with the damage response though :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    You would probably have to take a loan to get the Rice cert it is like 14l
  • The Helper The Helper:
    I was hoping you were going to say you wanted to be a cook and wished to open up a Food Truck there are so many opportunities for that here
  • The Helper The Helper:
    you can only open the bar if you sell food and a food truck in the parking lot counts
  • The Helper The Helper:
    here in houston
  • The Helper The Helper:
    most bars are struggling to build food prep and even some I know are doing there own food trucks
  • The Helper The Helper:
    but yeah man you should come to Houston there is so much more opportunity here than San Antonio. Just look at all the homeless people on the Riverwalk and downtown there you cannot even walk down the street without getting mobbed them
  • The Helper The Helper:
    check out this place apparently it is the best roommate site out there roommates.com lol
  • Varine Varine:
    The homeless people reminded me of New York
  • Varine Varine:
    I'll check it out, my lease expires in like a few months so I need to figure something out.
  • Varine Varine:
    I tried to open a food truck in Sandpoint a few years ago but the city said no, then like two years later they passed new laws to encourage it and gave them all fucking tax breaks and shit. And at that point I didn't have enough money to go buy one so I was way too late to the game once other cities realized they could just bring their existing truck there, or sell their brick and mortar.
  • Varine Varine:
    I do like food trucks though, they're way more fun than restaurants and usually I also get some of that tip money there.
  • Varine Varine:
    Restaurants are really hard if you don't have a back up source of income to fund them sometimes, in my experience most owners either got really really lucky, had existing money that allowed them to buy an already successful one, or they have family money to fall back on for loans. It's few and far between to see very inspiring success stories where the person actually got it through hard work and perseverance. I thought about opening one lots and I always just end up not thinking it'll work. I would much rather just find someone that has that money and go work for them
  • The Helper The Helper:
    i am not talking about opening a brick and mortar I am talking about food trucks though I have seen some brick and mortar mexican places open up during covid that are doing good because there food is awesome!
  • The Helper The Helper:
    Food trucks are killing out here because Bars cannot open unless they sell food and the governor ok'd the use of a food truck in front as serving food
  • The Helper The Helper:
    Just not enough food trucks
  • The Helper The Helper:
    a buddy of mine just opened up a food truck and he is killing it but he is a great cook and has awesome food right in the middle of the pandemic too food trucks are immune to pandemic because they are take out in Texas you will always be able to get take out or delivery
  • The Helper The Helper:
    He is in the different food facebook groups in houston and posts videos of him making his food
  • The Helper The Helper:
    he is killing it
  • jonas jonas:
    @Varine with the restaurants, there surely is a lot of luck and hard work but most restaurants fail because they suck. Flair isn't right, economics not well thought through, food is mediocre or sucks, location is bad, etc. If you're thinking about opening one, make sure you're looking at the stories of those that would be playing at your level, don't let your hopes be dragged down by all the subpar restaurants out there.
  • jonas jonas:
    I'm a bit worried about the future of data science, there's an influx of incompetent people hired by incompetent managers, that can't last. But I'm sure smart data scientists will always be useful and hireable. Same as smart security people.
  • jonas jonas:
    My sister in law worked in a vegan food truck, the owners were also making a killing, added several trucks and opened two restaurants over 5 years
  • Ghan Ghan:
    The CompTIA stuff is pretty much crap unfortunately. The places that ask for those low-level certs aren't likely places you want to work. For IT you really want a degree, but in the meantime you need to figure out some way to learn the skills. Cybersecurity is really hot right now so competition is fierce.
  • tom_mai78101 tom_mai78101:
    I realized I don't have anything much to say, other than "Good luck!". Compared to other places, I'm just very lucky we didn't have a lot of surges of cases coming in.
  • The Helper The Helper:
    My daughter just got back from school at Georgetown TX, outside of Austin and said there were 100 cases in the last week but she also said nobody was wearing a mask anywhere so people mask up and stay safe!
    +1

    Staff online

    Members online

    Affiliates

    Hive Workshop
    Top