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.
  • Ghan Ghan:
    We did!
  • Ghan Ghan:
    The old shoutbox wasn't supported anymore. We updated xenForo, so it had to be replaced.
  • jonas jonas:
    let's see if everyone finds it... the nice thing about the shoutbox was I could check on it even while logged out, but the existence of this one is hidden when you're not logged in
  • Ghan Ghan:
    We can fix that.
  • Ghan Ghan:
    Chat should show on the sidebar when not logged in now.
  • Ghan Ghan:
    (You'll still need to log in to post messages)
  • Ghan Ghan:
    Test!
  • tom_mai78101 tom_mai78101:
    I must be in a test server.
  • tom_mai78101 tom_mai78101:
    Nice, Twitter tweets embedding now works
  • Wizard Wizard:
    Yup.
  • Ghan Ghan:
    Excellent.
  • Ghan Ghan:
    @tom_mai78101 Hello there.
  • Ghan Ghan:
    Tagging works in the chat too.
  • tom_mai78101 tom_mai78101:
    @Ghan Missed it.
  • Wizard Wizard:
    Still fixing things here and there. Added widgets to the portal, will make it match the ones here on the forum index tomorrow.
  • Ghan Ghan:
    The venerable World Editor Tutorials site has been converted to HTTPS at last.
  • jonas jonas:
    cool
  • jonas jonas:
    and I can even edit my messages, nice
  • seph ir oth seph ir oth:
    GENERAL CHIT CHAT, YOU ARE A BOLD ONE
  • Ghan Ghan:
    Hello there
  • The Helper The Helper:
    this new chatbox is great and the forum software update is great too
    +1
  • The Helper The Helper:
    upgrade has fixed forum registration spam problem
  • tom_mai78101 tom_mai78101:
    Something tells me we might be able to customize the chatbox a bit, considering that there's a gap under every message.
  • Wizard Wizard:
    Going to deploy a fix soon, just had to take some time for myself this weekend.

    Members online

    No members online now.

    Affiliates

    Hive Workshop
    Top