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
 

Merko

New Member
Reaction score
0
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.
 

tommerbob

Minecraft. :D
Reaction score
110
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)
 

B0ndo

New Member
Reaction score
4
Merko your trigger is not a DoT effect, I'd use tommerbob's idea if that's what you're looking for.
 

Inflicted

Currently inactive
Reaction score
63
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.
 

Quadratomic

New Member
Reaction score
0
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
 

Quadratomic

New Member
Reaction score
0
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
 

tommerbob

Minecraft. :D
Reaction score
110
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.
 

Quadratomic

New Member
Reaction score
0
@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.
 

Quadratomic

New Member
Reaction score
0
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
 

tommerbob

Minecraft. :D
Reaction score
110
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.
 

Inflicted

Currently inactive
Reaction score
63
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.
 

SouLEDGE

Damn you advanced calculus
Reaction score
75
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.
 

tommerbob

Minecraft. :D
Reaction score
110
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.
 

SouLEDGE

Damn you advanced calculus
Reaction score
75
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
 

tommerbob

Minecraft. :D
Reaction score
110
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.
 

Quadratomic

New Member
Reaction score
0
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>)
 

tommerbob

Minecraft. :D
Reaction score
110
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.

      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