Question regarding damage dealt over time in an area...

Quadratomic

New Member
Reaction score
0
As the title states, is it possible to inflict steady damage over a period of time to any unit that is within a certain region? I haven't been able to find anything anywhere regarding what I'm looking for specifically.

Thanks in advance.

- Quadratomic
 
Hi.
I've just played around with Wc3 Editor for a couple of days, so not really much of help.

Will this be of help?
09May_Monday_lvxCqs.jpg

Atleast then you will deal 500 damage when someone enters the region. I don't know how you can check if a unit is inside the region or not though :/

Another method is to place a unit of some kind, inside the 'area', and make it use "Immolation" Hero skill by Night Elfs to make the AOE damage over time. Just increase the damage and range. And with triggers, you can probably add\remove the AOE as you wish.
 
You can use a periodic trigger, and pick every unit (matching condition) within X range of the unit. Then do actions to (picked unit). It would look something like this:

Trigger:
  • Events
    • Game - Every 5.00 seconds of game time
    • Conditions
      • ([Your unit] Is Alive) Equal to True
    • Actions
      • Set Temp_Point = (Position of [Your unit])
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit within 500.00 of Temp_Point and Do Actions
        • Loop - Actions
          • Unit - Cause [Your unit] to damage (Picked unit) dealing 500.00 damage of attack type Spells and Damage type Normal
      • Custom script: call RemoveLocation(udg_Temp_Point)
 
Merko your trigger is not a DoT effect, I'd use tommerbob's idea if that's what you're looking for.
 
Don't even consider.
Use tommerbob's idea.

Although, where would you like the damage to be coming from? Whom i mean, which unit? Or just permanent reduction of hit points from no unit? Please clarify.
 
Thanks for the replies everyone. I'll use tommerbob's idea to see if it's what I'm looking for.

My aim is to have "radiation" zones, so the damage will be coming from no specific unit.

- Quadratomic
 
I used tommerbob's idea but I stripped it of a few things, and it seems to work just fine for what I'm looking for:

Trigger:
  • Zone 1
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in RadiationZone1 <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Cause DummyDmgUnit 0060 <gen> to damage (Picked unit), dealing 25.00 damage of attack type Chaos and damage type Slow Poison
 
It looks good, but just add one line before your Unit Group action:

Trigger:
  • Custom script: set bj_wantDestroyGroup = true


That will clear up the memory leak that your unit group causes. If you don't know what memory leaks are, do a quick search. They are a major aspect of WC3 mapmaking, and you need to know about them and how to get rid of them.
 
@tommerbob - I've done a little reading on memory leak issues in WC3. I'm definitely going to have to learn about how to get rid of them. Is there a FAQ or something regarding it that will delve into it a little more?

Thanks!

- Quadratomic

Edit: Ignore the last statement. I believe I have found it here.
 
Learning to prevent these or clear them up if they have been created adds a whole other aspect to WC3 mapmaking. Joy!

Out of curiosity, do you guys clean memory leaks up as you go along, or get everything finished and go through and clean them up afterwards? I'm trying to think of the most efficient way to do this before I get too far into my map. Doing it as you go along seems like it would be the best way, so you don't forget anything...

- Quadratomic
 
Definitely as you go along. Once you get the hang of it, it becomes second-nature. Just remember the basics:

- Unit Groups leak.
- Points leak.
- Player groups leak (except "All Players")

There is other stuff too, but that's basically the stuff you should worry about.
 
So is this solved now?
Or are there any other problems you had?

Note, that from a unit, there could be problems such as armor, so you'l need to set it to the correct the type.

or perhaps periodic reduction of units withins hit points?

And, careful of the leaks. But with that tutorial you should be fine.
 
Personally I would use Percentage damage instead of just plain 25 dmg.
Depends on what enters the "radiation zone".

If it's heroes they definitely won't all have the same HP?, and making it % gives a set time limit of how long something can stay inside the radiation zone.
cant exactly remember what the unit action was - don't have editor with me right now
but I know it's something like:
Trigger:
  • Unit - Set life of (picked unit) to currentHP% - 1%

if you're gonna cause 1% hp, otherwise just adjust.
 
Personally I would use Percentage damage instead of just plain 25 dmg.
Depends on what enters the "radiation zone".

If it's heroes they definitely won't all have the same HP?, and making it % gives a set time limit of how long something can stay inside the radiation zone.
cant exactly remember what the unit action was - don't have editor with me right now
but I know it's something like:
Trigger:
  • Unit - Set life of (picked unit) to currentHP% - 1%

if you're gonna cause 1% hp, otherwise just adjust.

That action will not cause a unit to kill the target, which means the player would get no credit for the kill. If he wanted to use a percentage, it would be:

Trigger:
  • Unit - Cause [Unit] to damage [target] dealing ((Max Life of [Target]) x 0.1) of attack type Spells and Damage Type Normal


That action would cause 10% of the targets max life in damage per tick.
 
Thanks for the replies everyone. I'll use tommerbob's idea to see if it's what I'm looking for.

My aim is to have "radiation" zones, so the damage will be coming from no specific unit.

- Quadratomic

1) Your method still wouldn't work 100% either because you're still using a damage type and there's armor to consider.

2) He doesn't want the damage to come from anyone so if he's going to be making a 6v6 map or whatever where all players are used you can't just make make one player's unit damage the other - they'd get the credit for it.

3) Weather it kills the target or not can be done with a check to see what the HP of the unit is before its life is set lower that 0%,
but I'm pretty sure this will kill the target anyways, again, I don't have the editor with me to check
 
Oh I didn't see that part of his post. :p Then I stand corrected. Just use the "set life" method. Or use a dummy unit to deal the damage.

If he's worried about dealing an exact amount of damage, then just use Universal/Chaos damage.
 
Thanks for the reply guys.

Trigger:
  • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) - 5.00)%


It works like a charm. A percentage based damage is much better for what I'm planning on doing. It also rid me of that ugly dummy unit.

Since I have an active topic still, I'm gonna ask something else if y'all don't mind. I'm trying to get my unit out of my loot area once they're done picking up/dropping items. I want it to be entered text based (i.e. -exit or -out). I know I should know this, but it's not working how I imagined it!

Trigger:
  • Leave
    • Events
      • Player - Player 1 (Red) types a chat message containing -exit as An exact match
    • Conditions
      • (P1Loot <gen> contains (Triggering unit)) Equal to True
    • Actions
      • Unit - Move (Triggering unit) instantly to (Center of Starting Town <gen>)
 
It's because there is no event response in that trigger for (Triggering unit). You need to set the unit to a variable and then reference it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • 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 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