Calculate damage over time

Archideas

Active Member
Reaction score
32
I'm trying to create a Maim like abiltity, where an enemy unit is targeted. The targeted unit then becomes slowed and suffers damage over time. This is the damage I'm as efficiently as possible am trying to deal to the unit over time.

Level 1 - 100 damage over 10 seconds
Level 2 - 140 damage over 11 seconds
Level 3 - 180 damage over 12 seconds

How do I achieve this by the most efficient triggering possible? I've gotten this far, but by no means it's nowhere accurate in damage.

Trigger:
  • Maim
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Maim
        • Then - Actions
          • Set Caster = (Casting unit)
          • Set TempTarget = (Target unit of ability being cast)
          • For each (Integer A) from 1 to (9 + ((Level of (Ability being cast) for Caster) + 1)), do (Actions)
            • Loop - Actions
              • Wait 1.00 seconds
              • Unit - Cause Caster to damage TempTarget, dealing ((Real((Level of (Ability being cast) for Caster))) x 50.00) damage of attack type Spells and damage type Normal
        • Else - Actions


I might have overlooked something really basic and simple, but I simply blame it on a temporary brainfart. :p
 
Using a "Wait" inside an Integer A loop isn't a good idea...
You'd be much better off by using another trigger with the event "Every 1.00 seconds of game-time".

Does it need to be MUI ? (MUI = Multi-Unit-Instanceable)
 
Use Shadow Strike (if active) or one of the many Poison Attack abilities like Envenomed Weapons (if passive). ;)
 
It is active, yeah. But I don't want the annoying text showing damage over and over.

*EDIT*

Oh, and it doesn't need to be MUI.
 
Ok, well, your damage calculation there were way off... It dealt way too much damage.
Here's the correct one, I'd believe:

Trigger:
  • Unit - Cause Caster to damage Target, dealing ((60.00 + ((Real((Level of Maim for Caster))) x 40.00)) / ((Real((Level of Maim for Caster))) + 9.00)) damage of attack type Spells and damage type Normal


And here are the triggers:

Trigger:
  • Maim
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Maim
    • Actions
      • Set Caster = (Triggering unit)
      • Set Target = (Target unit of ability being cast)
      • Trigger - Turn on Main DPS <gen>


This one, below, is "Initially Off":

Trigger:
  • Main DPS
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Cause Caster to damage Target, dealing ((60.00 + ((Real((Level of Maim for Caster))) x 40.00)) / ((Real((Level of Maim for Caster))) + 9.00)) damage of attack type Spells and damage type Normal
      • Set DPS_Tick = (DPS_Tick + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DPS_Tick Equal to ((Level of Maim for Caster) + 9)
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
not sure if u can turn off the silence but if can u can use soul burn it also slows and has dps
 
Maim is Learn
Event Unit Learns Skill
Condition Skill Learned = Maim
Action Set Variable : Maim_Integer(1)= Maim_Integer(1)+2
Set Variable : Maim_Integer(2)= Maim_Integer(2)+40
Set Variable : Maim_Integer(3)= Maim_Integer(3)+1
Maim is Used
Event Unit Starts The Effect of an ability
Condition
Action If (All Conditions are True) then do (Then Actions) else do (Else Actions)
IF: Condition Ability being cast : Maim
Then : Actions: Set Maim_Units(1) = ( casting unit )
Set Maim_Units(2) = ( Target unit of ability being cast )
Set Maim_Integer(4) = 100+ Maim_Integer(2)
Set Maim_Integer(5) = 8 + Maim_Integer(1)
Set Maim_Integer(6) = Maim_Integer(4) / Maim_Integer(5)
Action If (All Conditions are True) then do (Then Actions) else do (Else Actions)
IF: Condition Maim_Integer(3) = 1
wait 1
cause damage with Maim_Integer(6)
wait 2,3,4,5,6,7,8,9,10
IF: Condition Maim_Integer(3) = 2
wait 1
cause damage with Maim_Integer(6)
wait 2,3,4,5,6,7,8,9,10,11,12
IF: Condition Maim_Integer(3) = 3
wait 1
cause damage with Maim_Integer(6)
wait 2,3,4,5,6,7,8,9,10,11,12,13,14
IF: Condition Maim_Integer(3) = 4
wait 1
cause damage with Maim_Integer(6)
wait 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
Else: Actions:
 
@ Koma; that didn't work so well. It kept damaging the targeted unit over and over and over even after the desired amount had been dealt. I guess it has something to do with that the Integer DPS_Tick isn't set. What should it be? ;O
 
It's supposed to be set to 0...
Though it worked for me :S

Maybe add this to the first trigger ("Maim" I mean :D):
Trigger:
  • Set DPS_Tick = 0
 
check out this tutorial on the new hash tables in war3... it has an example of a heal over time spell using the hash tables... rather simple and in mui. You would then just need someone to show you how to jass out all of the leaks to complete it.
 
@ Koma, still keeps damaging the unit over time until it's dead. =/

@ Murder, I'll check it out, thanks.
 
Post your trigger maby you did something wrong
 
Trigger:
  • Maim
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Maim
    • Actions
      • Set DPS_Tick = 0
      • Set Caster = (Casting unit)
      • Set TempTarget = (Target unit of ability being cast)
      • Trigger - Turn on Maim DPS <gen>


Trigger:
  • Maim DPS
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Cause Caster to damage TempTarget, dealing (60.00 + ((Real((Level of Maim for Caster))) x (40.00 / ((Real((Level of Maim for Caster))) + 9.00)))) damage of attack type Spells and damage type Normal
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DPS_Tick Equal to ((Level of Maim for Caster) + 9)
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
You dont set DPS_Tick = DPS_Tick + 1 in your second trigger
 
Edit: Beaten by the crazy frog.
Trigger:
  • Maim DPS
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • *************Set DPS_Tick = DPS_Tick + 1*************
      • Unit - Cause Caster to damage TempTarget, dealing (60.00 + ((Real((Level of Maim for Caster))) x (40.00 / ((Real((Level of Maim for Caster))) + 9.00)))) damage of attack type Spells and damage type Normal
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DPS_Tick Equal to ((Level of Maim for Caster) + 9)
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Your damage action there still doesn't look right...

Mine:
Trigger:
  • Unit - Cause Caster to damage Target, dealing ((60.00 + ((Real((Level of Maim for Caster))) x 40.00)) / ((Real((Level of Maim for Caster))) + 9.00)) damage of attack type Spells and damage type Normal


Yours:
Trigger:
  • Unit - Cause Caster to damage TempTarget, dealing (60.00 + ((Real((Level of Maim for Caster))) x (40.00 / ((Real((Level of Maim for Caster))) + 9.00)))) damage of attack type Spells and damage type Normal


It needs to be int the right order, or else it won't turn out right..
Notice that I have 2 parantheses in the beginning:
Code:
[COLOR="Red"](([/COLOR]60.00 + ((Real((Level of Maim for Caster))) x 40.00)) / ((Real((Level of Maim for Caster))) + 9.00))

And you only have one...
 
Edit: Beaten by the crazy frog.
Trigger:
  • Maim DPS
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • *************Set DPS_Tick = DPS_Tick + 1*************
      • Unit - Cause Caster to damage TempTarget, dealing (60.00 + ((Real((Level of Maim for Caster))) x (40.00 / ((Real((Level of Maim for Caster))) + 9.00)))) damage of attack type Spells and damage type Normal
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DPS_Tick Equal to ((Level of Maim for Caster) + 9)
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions

Yes thats what i said so no need to repeat me.
 
Trigger:
  • Maim DPS
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Cause Caster to damage TempTarget, dealing ((60.00 + (Real((Level of Maim for Caster)))) + (40.00 / ((Real((Level of Maim for Caster))) + 9.00))) damage of attack type Spells and damage type Normal
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DPS_Tick Equal to ((Level of Maim for Caster) + 9)
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions


This is what I got so far after editing. What am I missing since I don't get two ( after ((Real?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top