• 🏆 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!

[JASS] BerzerkeR's DoT - changing to AOE ground [Help]

Status
Not open for further replies.
Level 5
Joined
May 24, 2009
Messages
55
Help : Restructuring this spell into a Ground AOE DoT spell from its currect Single Target DoT nature.

Goal : I wish to modify this spell so that when the spell is cast on a specific ground, any enemy unit
that remains in that area will be dealt damage, but if the spell is still in effect and the unit leaves the area,
that unit will not be damaged. (Kinda like Flame Strike)

Alternatives: If there is already a spell similar to what i described in my goal, please point me that way.
Any form of help is greatly appreciated, thank you.

  • BerzerkeR's Dot
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) equal to DoT
    • Actions
      • Custom script: local unit a = GetTriggerUnit()
      • Custom script: local unit b = GetSpellTargetUnit()
      • Custom script: local integer c = GetUnitAbilityLevelSwapped(GetSpellAbilityId(), a)
      • Custom script: local integer d = 1
      • Custom script: local real e = 100
      • Custom script: local real f = (e*I2R(c))
      • Custom script: local real e = 100
      • Custom script: local real h = (g*I2R(c))
      • Custom script: local real i = 1.0
      • Custom script: call UnitDamageTarget(a, b, f, true,false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNKNOWN,WEAPON_TYPE_WHOKNOWS)
      • Custom script: call DestroyEffect (AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayDamage.mdl",b,"chest"))
      • Custom script: call DestroyEffect (AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\ManaBurn\\ManaBurnTarget.mdl",b,"origin"))
      • Custom script: loop
      • Custom script: exitwhen GetBooleanOr(d > 10, GetUnitState(b, UNIT_STATE_LIFE) <= 0.405)
      • Custom script: call TriggerSleepAction(i)
      • Custom script: call UnitDamageTarget(a, b, h, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNKNOWN,WEAPON_TYPE_WHOKNOWS)
      • Custom script: call DestroyEffect (AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayDamage.mdl",b,"chest"))
      • Custom script: call DestroyEffect (AddSpecialEffectTarget("Abilities\\Spells\\Other\\AcidBomb\\BottleImpact.mdl",b,"chest"))
      • Custom script: set d = d + 1
      • Custom script: endloop
      • Custom script: set a = null
      • Custom script: set b = null
Spell Origin : Wound Poison from "Simple Spell Pack v1.1a" by -BerZeKeR-
 
Last edited:
Level 5
Joined
May 24, 2009
Messages
55
I dearly thought people wouldn't point me towards Flame Strike if i have mentioned Flame Strike beforehand, obviously I'm dead wrong,
and please forgive me. Unfortunately standard Flame Strike is not capable of giving me:

  • Flame Strike LoL
    • Actions
      • Units - Cause Unit_1 to damage Unit_target dealing ((Real((Strength of Unit_1))(include bonuses))))) x 0.50)) damage of type Spells and damage type Normal
I sincerely hope someone would point me towards a good direction.
 
Level 15
Joined
Dec 18, 2007
Messages
1,098
First, create the spell in JASS since you understand it. Its inefficient to use GUI and loads of custom scripts. However, if you copied it from BersekeR's spell pack, you could try my solution.
You will need 2 triggers. One to create a dummy unit and assign a value to it (so that you can retreive that value later and use it as the damage value). Add that unit to a unit group and move on to the next trigger.
Then, you will need a periodic trigger (a periodic event). In this, you pick every dummy unit in the area of deal damage to them based on the value you stored.
If you do not understand this store/retrieve thing, you can check out my spellpack, it uses this a lot.
 
Level 5
Joined
May 24, 2009
Messages
55
Unfortunately, like you guess zack, I am not very familiar with the nature of JASS, and i
did only copy/paste berzerker's script, it's a very simple single trigger coded DoT spell
and it came with perfect documentation.
I went through your spell pack zack, and discovered some traits that i am looking for in
your whirlpool spell, however i must ask for your confirmation, on whether the whirlpool
spell is MUI?
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
Create a ward there, invisible and all, and give it a custom value equal to X * Strength/Agility/Whatever. Then loop through all the wards, for each ward have a unit group array and an integer array, set them both and damage all units of Group[Number] by Damage[Number].
 
Level 5
Joined
May 24, 2009
Messages
55
Thank you reaper for your kind effort, can you further instruct me on putting a time mechanism for your method so that it would be a Damage over Time spell? If its already in your description then please forgive me, for i have overlooked it, and I may need further enlightenment.
 
Level 4
Joined
Jun 16, 2009
Messages
92
If I'm understanding correctly... you're overthinking this. A lot.

Every x seconds of game time.
Set xTempPoint = Target point of ability being cast.
Pick every unit in x range of xTempPoint.
If then else multiple functions.
If unit is an enemy, not a structure, etc, etc, etc...
Then damage picked unit for real value = your hero's str or your formula or whatever.
Set picked unit location = position of picked unit.
Create special effect
Destroy special effect
Whatever
Whatever
Whatever


Yes?
 
Level 5
Joined
May 24, 2009
Messages
55
Well forgive me if my words is offputting or aristocratic, as that is not my true intention.
Yes Wrel thanks for the great elaboration, that method is very similar to zack's whirlpool spell which I was having a little difficulty molding it to my liking but after you described it that way, I'm getting close.
 
If you understand how to work with unit groups, ou should figure it out pretty fast.

You just need a location and a unit group. To bad i didn't mannage to wort with these two things...

for location use reals realX realY, to make a unit group ask here, mostlikely someone knows :p

Then you just damage "picked unit"

*I'm going to work now...

~Berz
 
Level 5
Joined
May 24, 2009
Messages
55
I have very little knowledge of JASS but i guess this will be a good time to expand that knowledge a bit more, I'll look up into those pointers you gave Berzeker, and I am terribly sorry for the spelling mistake i made on your name.
 
Level 5
Joined
May 24, 2009
Messages
55
Thank you guys for the insights on JASS tools, now with the load of information awarded to me on making an aoe DoT in this thread, i guess its about time to digest it, and make something of it. Nevertheless, I thank you all for making an effort to point me towards a good direction.
However, anymore helpful tips are always welcomed.
 
Level 5
Joined
May 24, 2009
Messages
55
Zack, I must give thanks to you and your wonderful whirlpool spell, not only it is MUI it is also also tremendously modifiable, after i've got the hang of it that is, every second i spent trying to understand that spell is not even a little bit of time wasted.

Now, I'm just trying to dig into Berzeker's spell with the tips he gave, its just amazing to me how he did his DoT spell in just a single trigger, simply stunning.
 
Status
Not open for further replies.
Top