• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

DoT based on duration stayed in AoE spell help.

Status
Not open for further replies.
Level 6
Joined
Apr 27, 2006
Messages
186
Without using JASS is it possible to make a triggered spell (without using unit custom values) that damages units for X damage the first second, YX damage the next second 2YX damage the third second, 3YX damage the fourth second, etc. (i.e. 2 damage first second, 3 damage second second, 4 damage fourth second, etc.). I can't quite figure out how to create this spell XD.
Help would be appreciated. Thanks in advance for any help :D.
 
Level 8
Joined
Jul 16, 2004
Messages
390
easiest way i can think of is using an ability based off Inferno
Where you summon an invisible unit, it does not stun or damage when summoned or show any summoning animation. That unit then has immolation that hurts any enemy units near it.

However you cant really change the amount of dmg each second with that
 
Level 6
Joined
Apr 27, 2006
Messages
186
First of all, you COULD do it with immolation in the way that you're thinking of my ability, just have a timer that increments the level of the immolation each second, however if a unit stays in the area for 10 seconds, it will be taking much, much more damage than a unit that has just entered the area. In other words, you have to make each unit have some kind of special indicator that says how long it's been in the area.
 
Level 6
Joined
Apr 27, 2006
Messages
186
Alright, thanks, I'm going to try to learn JASS very soon XD. I know Visual Basic, Turing, Delphi + Pascal, and QBasic so it shouldn't be too hard.
 
Level 3
Joined
Feb 18, 2007
Messages
34
its possible with triggers ---- and heres my pointer ---------- buffs ----- with different lvls ------ increasing buff lvl each second to all units within the area and removing the buff one a unit leaves the area ------ the damage dealed should have a ?xlvl of bufff ---- but im not sure u can get that buff lvl --- who knows but i suggest u give it a try this sounds perfect
 
Level 2
Joined
Apr 27, 2004
Messages
28
have you tried ordering a dummy unit to damage the units every second?

I think you could run a periodic event for the spell's duration to add units within the range of the spell to a group and have the dummy damage the units based on your table.

Like..

Time - Every 1.00 seconds of game time

Set time = (time + 1.00)
(pick every unit in [whatever]) and do
Unit - Cause Dummy to damage (Picked unit), dealing [time] damage of attack type [Spells] and damage type [Normal]

You just need another trigger detecting units in and out of range. You can do this with buffs easily enough.
 
Level 6
Joined
Apr 27, 2006
Messages
186
I must not have made myself clear, as two people have misunderstood the effects of my ability now.

Steps:
1: You Cast The Area Of Effect Spell
2: Loop the following statement (lets say 10 times)
Damage all units in the area based on how long THAT INDIVIDUAL UNIT has stayed in the area for (leaving the area will reset the damage amount)
Wait 1 second

I have an idea though, what I'm going to do is add dummy abilities to the units, with the dummy ability having levels equal to the duration of the damage over time spell (in seconds), every second each unit in the region has the level of it's dummy ability incremented by 1, as well, units in the whole map with the DUMMY ABILITY that are outside of the region have their dummy abilities removed. I'ma get to work on this right now.


P.S. While I'm posting, does anyone know why this trigger action doesn't move a preset region?:
Region - Center Bore Tunnel Wyrm <gen> on TempPoint

If this doesn't move a region, then what action does?

Or at least, it wouldn't be worth the time to try and make it. It would be possible, but it would not be fun. Question, though: why can't you use custom values?

P.S.S. I can't use custom values becomes I'm using them somewhere else XD.
 
Last edited by a moderator:
Level 2
Joined
Apr 27, 2004
Messages
28
CV's being used for Pathing perhaps?

on the spell, does the damage take place after the spell ends or.. Im still not sure I get what your doing after seeing your last post.

Maybe im just blind atm, but it sounds like you want to track the time they are in the AOE and then damage them based on that time.

At any rate, it sounds like you got an idea rolling, hope it works.
 
Level 3
Joined
Feb 18, 2007
Messages
34
kid you honestly didnt get my point :
Do it like this :

1st trigger :
Just increment the level of a buff on a unit by 1 per second, and then deal damage like (some number) X lvl of the buff . Its easy .
2nd trigger :
Remove the buff once a unit leavas a range of (some number) around the caster



Easy as pie jsut ask questions ill awnser if i visit this
 
Level 7
Joined
Dec 26, 2006
Messages
303
Well guys, I don't really good at this kind of thing but when I try this at my own editor... Guess what?? You think too much! This pretty messy but really useful:

E-
A unit cast spell
C-
Casted spell equal to (whatever)
A-
Set CastingUnit=SiA
Set SpellOff=false
Set x=100*level of (whatever) from casting unit
Set y=2+level of (whatever) from casting unit
If Conditions equal to true then do action else do action
C-
SpeelOff equal to false
A-
Picked every units in range of 600
Deals x to picked units
A-
Do Nothing
Wait 1.00 seconds
If Conditions equal to true then do action else do action
C-
SpeelOff equal to false
A-
Picked every units in range of 600
Deals y*x to picked units
A-
Do Nothing
Wait 1.00 seconds
If Conditions equal to true then do action else do action
C-
SpeelOff equal to false
A-
Picked every units in range of 600
Deals 2*y*x to picked units
A-
Do Nothing
Wait 1.00 seconds
......

And do it until the last you want too, this cause damage to AoE 600, 100 damage first, 200 and 400 for next time... SpellOff are another trigger that followed this trigger:

E-
SiA issued order targeted unit
SiA issued order targeted point
C-
A-
Set SpellOff=True

This recommended to make the spell stoped when you moving
 
Level 8
Joined
Dec 29, 2006
Messages
359
P.S. While I'm posting, does anyone know why this trigger action doesn't move a preset region?:
Region - Center Bore Tunnel Wyrm <gen> on TempPoint

If this doesn't move a region, then what action does?

Your region must be set to a variable otherwise the action won't affect it.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
I'm pretty sure he wants this done for an area (not just one unit), so you'd need locals/gamecache/Custom Value (but that's a really bad idea)

As to whoever said increment the buff, you can't increment buffs. You also can't detect the level of a buff.

And CoolSoFar, DoNothing is sucky and pointless, and wastes processing speed. (which is a little ironic for me to say this as we're trying to work out a way to have someone do this in GUI)

Anyways, it's fairly trivial in Jass, but a small nightmare in GUI, as you need to work out a way to store each unit's data seperately (and no, you can't use Custom Values, unless the spell will only be cast once at a time and you don't need any other spell/etc to use them)
 
Level 7
Joined
Dec 26, 2006
Messages
303
I know it purple, I never use Do Nothing trigger in my whole life because it's all the same like no trigger... I just write it to make it looks cool, like my name <-- That line is off-topic
 
Level 8
Joined
Sep 13, 2006
Messages
431
As to whoever said increment the buff, you can't increment buffs. You also can't detect the level of a buff.

While correct on the first part, you could use separate buffs for each level in order to detect hte level of the buff. Probly still won't help, but just wanted to point that out...

Oh, and concerning custom values, there are other things you can use to store individual unit values. I used vertex coloring once, and sure, it changed color by 1 %, but it was still rather useful and allowed MUI for me (you can store 300 custom values by changing the vertex coloring by only 1% per color). Anyway, maybe consider using it...
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Using seperate buffs for each level is nasty as hell (and it's not really incrementing the level, either ><)

A better way is just to use a Data Storage system that grabs the level of the buff, or not even bother with buffs and use the units directly, the buff just being more of a 'notification' for the user.

Also --

Can you actually detect the vertex coloring of a unit? I don't think so, but you may be able to.

Anyways, a better idea is to just learn enough Jass to be able to dump all your data into structs or the Gamecache

Also, CoolSoFar, that's basically saying that you're giving people inefficient triggers 'cause they look cool?
 
Level 8
Joined
Sep 13, 2006
Messages
431
Using seperate buffs for each level is nasty as hell (and it's not really incrementing the level, either ><)

I didn't say it was fun. I just said it was possible (which you denied previously). Speaking of which, what do you mean it's not incrementing the buff? If buff = blah (1), level = 1. That seems exactly like incrementing to me, but correct if I'm wrong.

Can you actually detect the vertex coloring of a unit?

Yes. If I recall correctly, it was a JASS function. I'll see if I can find it for you, though I can't make any promises...
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
A) I meant physically incrementing the level (like Buff Level 2), not a completely new buff. (since incrementing the level would be a huge amount easier to handle, as you can use math instead of giant if-statements)

B) I can't find anything that may do that, cept for Lightning Effects (and yes, I do use JASS)
 
Level 8
Joined
Sep 13, 2006
Messages
431
A) I meant physically incrementing the level (like Buff Level 2), not a completely new buff. (since incrementing the level would be a huge amount easier to handle, as you can use math instead of giant if-statements)

You could use string conversions with math, involving no if thens at all.

B) I can't find anything that may do that, cept for Lightning Effects (and yes, I do use JASS)

As I said before, I'll try to find it for you. I think my friend said he still has a copy of the map.

-----------------------------------

Anyway, let's get back on topic. What about using abilities to store the time in the AoE? Like, unit has buff for AoE at 1 second, give ability that does nothing and damage. At 2 seconds, if unit has AoE buff, increase level of ability and damage, etc. Then, unit doesn't have buff, remove ability...

Obviously not a polished idea, but an idea nonetheless, and I think it could have some potential....
 
Level 6
Joined
Apr 27, 2006
Messages
186
Sigh I'm going to try to explain my spell )because some people still don't understand) with an example.
We have unit A, unit B, and region C

1 Second - Spell is cast in region C
2 seconds - Unit A enters region C
3 seconds - Unit A takes 2 damage
4 seconds - Unit A takes 3 damage, Unit B enters region
5 seconds - Unit A takes 4 damage, Unit B takes 2 damage
6 seconds - Unit A leaves region, Unit B takes 3 damage
7 seconds - Unit B leaves region

28 seconds - Unit A enters region
29 seconds - Unit A takes 2 damage
30 seconds - Spell Ends

Is this a better explanation?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
STAY ON TOPIC. Help "Aoen" since he started this thread and stop debating about GUI storage methods. If you want to talk about GUI storage methods, make a new thread especially for that.

JUST USE HANDLE VARS! They would easily do the trick allowing you to attach the number of times a unit has been damaged allowing you to culculate the next damage. Appon the unit leaving the region, flush the handle var and so reset the counter. That simple that im supprised no one has made it for you.
 
Level 8
Joined
Sep 13, 2006
Messages
431
STAY ON TOPIC. Help "Aoen" since he started this thread and stop debating about GUI storage methods. If you want to talk about GUI storage methods, make a new thread especially for that.

JUST USE HANDLE VARS! They would easily do the trick allowing you to attach the number of times a unit has been damaged allowing you to culculate the next damage. Appon the unit leaving the region, flush the handle var and so reset the counter. That simple that im supprised no one has made it for you.

Meaning no offense, but Aeon wanted a GUI trigger. Handle vars enter into the realm of JASS, in which many have little experience. We were looking for an effective means by which to implement the idea of handle vars in GUI, and that, dear Doctor, is why we were debating storage methods.
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
this might be leakable, but its just a try

Trigger 1
  • The Skill Itself
  • Events:
  • Every 1.00 seconds of game time
  • Conditions:
  • Actions:
  • Set UnitGroup1 = (Units within 500.00 of (Position of (HERO)) matching ((Matching Unit) not equal to (HERO)))
  • For each (Integer A) from 0 to (Number of units in UnitGroup1), do (Actions)
  • Loop - Actions
  • Set Unit1 = (Random unit from UnitGroup1)
  • Unit - Increase level of AddDamage for Unit1
  • Unit Group - Remove Unit1 from UnitGroup1
  • Unit Group - Add Unit1 to UnitGroup2
  • For each (Integer B) from 0 to (Number of units in UnitGroup2), do (Actions)
  • Loop - Actions
  • Set Unit2 = (Random unit from UnitGroup2)
  • Unit - Cause HERO to damage Unit2, dealing (Real((Level of AddDamage for Unit2))) damage of attack type YourChoice and damage type YourChoice
  • Unit Group - Remove Unit2 from UnitGroup2
  • Trigger - Run Reset Damage <gen> (ignoring conditions)
Trigger 2:
  • Reset Damage
  • Events:
  • Conditions:
  • Actions:
  • Set UnitGroup3 = (Units in (Entire map) matching ((((Distance between (Position of (HERO)) and (Position of (Matching unit))) Greater than or equal to 501.00) and ((Level of AddDamage for (Matching unit) Greater than or equal to 2)) and ((Matching unit) not equal to HERO)
  • For each (Integer A) from 0 to (Number of units in UnitGroup3), do (Actions)
  • Loop - Actions
  • Set Unit3 = (Random unit from UnitGroup3)
  • Unit - Remove AddDamage from Unit3
  • Unit - Add AddDamage from Unit3
  • Unit Group - Remove Unit3 from UnitGroup3)
Well, this should cover it, its not Multi-Instanceable, and it is not Level-Bound, but to make it, that will require 1 set of both of these triggers for each Player, and triggers to set the HERO for each Player, and to make it Level-Bound, just remake the Damage [(Real((Level of AddDamage for Unit2)))] to (Real(((Level of Add Damage for Unit2) x (Level of SKILL for HERO))))

P.S.: there is a way to make it Rule-Bound(and Level-Bound), but that will involve 1 more trigger :p
 
Last edited by a moderator:
Level 6
Joined
Apr 27, 2006
Messages
186
XD, if you check back I already said I figured out how to make the trigger XD.
 
Status
Not open for further replies.
Top