• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Custom Aura Help

Status
Not open for further replies.
Level 7
Joined
Aug 11, 2010
Messages
269
Basically I need help with a certain spell:

Death Siphon Aura:
Whenever a nearby enemy unit is slain the Necromancer gains 2/2/4/4/6 bonus damage stacking 30/30/15/15/10 times. Each instance has a duration of 10 seconds. Additionally, this bonus is shared with nearby allied units.

In simpler words it's a flat damage aura that increases whenever a unit dies near the Necromancer. Can't seem to figure out exactly how to do this, though. I feel as though I might be over complicating things by using item bonus damage abilities for the damage effect.
Help will be appreciated and provided if the problem is solved, rep'd.

Trigger's I have gotten so far:
  • HNE Death Siphon Aura Effect
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching (((Level of Death Siphon Aura (Necromancer) for (Matching unit)) Greater than 0) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempInteger = (Custom value of TempUnit)
          • Set TempPoint = (Position of (Picked unit))
          • Unit Group - Pick every unit in HNEDeathSiphonAura_Group1[TempInteger] and do (Actions)
            • Loop - Actions
              • Unit - Remove [Effect] Death Siphon Aura (Level 1&2) from (Picked unit)
              • Unit - Remove [Effect] Death Siphon Aura (Level 3&4) from (Picked unit)
              • Unit - Remove [Effect] Death Siphon Aura (Level 5) from (Picked unit)
          • Unit Group - Remove all units of HNEDeathSiphonAura_Group1[TempInteger] from HNEDeathSiphonAura_Group1[TempInteger]
          • Set HNEDeathSiphonAura_Group1[TempInteger] = (Units within 900.00 of TempPoint matching ((((Matching unit) has buff [Custom] Death Siphon Aura ) Equal to True) and ((Matching unit) Not equal to (Picked unit))))
          • Unit Group - Pick every unit in HNEDeathSiphonAura_Group2 and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Death Siphon Aura (Necromancer) for TempUnit) Equal to 1
                  • (Level of Death Siphon Aura (Necromancer) for TempUnit) Equal to 2
                • Then - Actions
                  • Unit - Add [Effect] Death Siphon Aura (Level 1&2) to (Picked unit)
                  • Unit - Set level of [Effect] Death Siphon Aura (Level 1&2) for (Picked unit) to (Level of [Effect] Death Siphon Aura (Level 1&2) for TempUnit)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Death Siphon Aura (Necromancer) for TempUnit) Equal to 3
                  • (Level of Death Siphon Aura (Necromancer) for TempUnit) Equal to 4
                • Then - Actions
                  • Unit - Add [Effect] Death Siphon Aura (Level 3&4) to (Picked unit)
                  • Unit - Set level of [Effect] Death Siphon Aura (Level 3&4) for (Picked unit) to (Level of [Effect] Death Siphon Aura (Level 3&4) for TempUnit)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Death Siphon Aura (Necromancer) for TempUnit) Equal to 5
                • Then - Actions
                  • Unit - Add [Effect] Death Siphon Aura (Level 5) to (Picked unit)
                  • Unit - Set level of [Effect] Death Siphon Aura (Level 5) for (Picked unit) to (Level of [Effect] Death Siphon Aura (Level 5) for TempUnit)
                • Else - Actions

  • HNE Death Siphon Aura Learned
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Death Siphon Aura (Necromancer)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Death Siphon Aura (Necromancer) for (Triggering unit)) Equal to 1
          • (Level of Death Siphon Aura (Necromancer) for (Triggering unit)) Equal to 2
        • Then - Actions
          • Unit - Add [Effect] Death Siphon Aura (Level 1&2) to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Death Siphon Aura (Necromancer) for (Triggering unit)) Equal to 3
          • (Level of Death Siphon Aura (Necromancer) for (Triggering unit)) Equal to 4
        • Then - Actions
          • Unit - Remove [Effect] Death Siphon Aura (Level 1&2) from (Triggering unit)
          • Unit - Add [Effect] Death Siphon Aura (Level 3&4) to (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Death Siphon Aura (Necromancer) for (Triggering unit)) Equal to 5
        • Then - Actions
          • Unit - Remove [Effect] Death Siphon Aura (Level 3&4) from (Triggering unit)
          • Unit - Add [Effect] Death Siphon Aura (Level 5) to (Triggering unit)
        • Else - Actions
The triggering is by no means complete since I can't quite wrap my mind around getting it to work. (Such as granting the Necromancer temporary bonus damage that will share to other allied units)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I know of a way that I use but if you want to stack it 30 times and have 5 levels, you will get a total of 150 (100 in your stack stuff) levels.
That amount is very annoying in the map initializations. (I once had a map with 8 abilities with each 450 levels. Trust me it is annoying as hell.)

But I have some questions:
1: What is the difference between level 1 and level 2? (same question for 3 and 4)
2: Does this have to be MUI or MPI or single use?

(One Thing: Damage effect should be Trueshot Aura as it is already an aura that can filter melee/ranged units (you dont want that but you can so it is nice) and you can choose between flat or scaling damage (flat in this situation) and it is an aura (duh))
 
Level 7
Joined
Aug 11, 2010
Messages
269
Just woke up, sorry for the delay.

Essentially the spell stays the same (60 max damage) it's just it's quicker to get the maximum value of damage, which means it's easier to substain.

Group2 currently isn't set yet. I figured it'd be the group of units that cast the aura out that granted their temporary bonus damage to nearby units; although I couldn't wrap my mind around exactly how to do that.

@Wietlol, the Difference between 1&2, 3&4 essentially the same (The spell scales every two levels; meaning 1,3,5) so the difference in abilities are 1&2 have 31 levels (the first level is initial with 0 bonus damage), 3&4 have 16 levels (the first level is initial with 0 bonus damage), and 5 has 11 levels (the first level is initial with 0 bonus damage).

Also, yes. It's necessary to have this spell MUI. I'm trying to code this in a way that all units can benefit from having multiple instances of the aura. Which is why i'm finding such difficulty in triggering it.

And yeah, that's a good point. I probably should use a base damage aura. For some reason it never crossed my mind... I have a tendancy to overly complicate.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well finally I have something:

There are a few things that are hard/impossible to deal with but that shouldnt be a problem.

First of all it is MUI so there can be multiple necromancers for every player.

Secondly... well here are those few buggies:
- A Necromancer cannot levelup his Death Aura while the effect is active or if he is a high level.
- Level requirements dont work for this spell.

Here is the map with the spell.
I am still working on some optimizations, leak removals and bugfixes but now you can see what the concept is.

(Ow yes the first level ability is right. The other levels dont have a 0 value as start, but I am lazy and will do that at the end XD)
 

Attachments

  • Death Siphon Aura.w3x
    28.1 KB · Views: 48
Level 7
Joined
Aug 11, 2010
Messages
269
Hrm. These custom scripts are unfamiliar, but I see how you did it, I believe. I am curious; though. These local timers; these replace waits, correct? If so; these are far more efficient than what I've been using to replace waits. I'll have to check into using those, instead.

Thanks a bunch for the help, it's greatly appreciated +rep!

Well finally I have something:

There are a few things that are hard/impossible to deal with but that shouldnt be a problem.

First of all it is MUI so there can be multiple necromancers for every player.

Secondly... well here are those few buggies:
- A Necromancer cannot levelup his Death Aura while the effect is active or if he is a high level.
- Level requirements dont work for this spell.

Here is the map with the spell.
I am still working on some optimizations, leak removals and bugfixes but now you can see what the concept is.

(Ow yes the first level ability is right. The other levels dont have a 0 value as start, but I am lazy and will do that at the end XD)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Here is a better one (just new version)
- You are now able to level the skill properly.
- You only gain stacks from enemy deaths.
- Level requirements work fine now.
- Added text, buffs, etc.
- Completed all abilities.
- Removed Infinite Add Event leak.

Bugs:
- Leaks units that have Death Siphon Aura and died.

If there are any big problems or you want to know how something is done, just ask.
If not then this is the last version.
 

Attachments

  • Death Siphon Aura.w3x
    31.9 KB · Views: 41
Level 7
Joined
Aug 11, 2010
Messages
269
It seems good so far; my only issue is the fact the accumulated stacks drop off together. This sort of goes against the idea of the spell; as it makes it incredibly easily kept up inside of a Hero Defense sort-of-map when the duration of the stacks reset with each nearby kill.

Is it possible for each stack to have it's own timer that will periodically remove one stack at a time until there isn't any further stacks to remove?

Here is a better one (just new version)
- You are now able to level the skill properly.
- You only gain stacks from enemy deaths.
- Level requirements work fine now.
- Added text, buffs, etc.
- Completed all abilities.
- Removed Infinite Add Event leak.

Bugs:
- Leaks units that have Death Siphon Aura and died.

If there are any big problems or you want to know how something is done, just ask.
If not then this is the last version.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Hmm... Never made something like that before.
I think that it is easy to implement.

First of all. Go to the Timer Reset trigger and replace
JASS:
call SetUnitAbilityLevel(udg_TempUnit, udg_DeathSiphonAura[loopIndex], 1)
with
JASS:
call DecUnitAbilityLevel(udg_TempUnit, udg_DeathSiphonAura[loopIndex])

Then go to the Death Siphon Aura Increase trigger and remove
  • Custom script: set t = udg_TimerArrayDeathSiphonAura[GetForLoopIndexA()]
  • Custom script: if (t != null) then
  • Custom script: call PauseTimer(t)
  • Custom script: call DestroyTimer(t)
  • Custom script: endif
Should work fine.
 
Level 7
Joined
Aug 11, 2010
Messages
269
Strangely enough, it's still functioning much like it did initially; the stacks remain until the duration and then they're all removed together.

Hmm... Never made something like that before.
I think that it is easy to implement.

First of all. Go to the Timer Reset trigger and replace
JASS:
call SetUnitAbilityLevel(udg_TempUnit, udg_DeathSiphonAura[loopIndex], 1)
with
JASS:
call DecUnitAbilityLevel(udg_TempUnit, udg_DeathSiphonAura[loopIndex])

Then go to the Death Siphon Aura Increase trigger and remove
  • Custom script: set t = udg_TimerArrayDeathSiphonAura[GetForLoopIndexA()]
  • Custom script: if (t != null) then
  • Custom script: call PauseTimer(t)
  • Custom script: call DestroyTimer(t)
  • Custom script: endif
Should work fine.
 
Level 7
Joined
Aug 11, 2010
Messages
269
Then you implemented something wrong as it works fine for me.

It's very possible, sorry. Custom script and JASS aren't my area of expertise. Either that or I messed up somewhere. Either way, this works perfectly. Thank you so very much. I appreciate all of the time you spent helping me.

Edit: Apparently my incompetence shines through again, after copying the triggers over and renaming them to fit the scheme of the map (I prefix everything with H (for Hero) and the first two letters of the Hero's name (In this case HNE_) this makes things alot easier to navigate... Although I think I might've fucked something up since it's working absolutely fine -- but when it's supposed to remove stacks it doesn't. At all. I have no doubt this is incompetence on my end. Here's the map file, the triggers should be under Necromancer (Specifically, HNE Death Siphon Aura Initialization, HNE Death Siphon Aura Learn, HNE Death Siphon Aura Bonus Damage, HNE Death Siphon Aura Expires (Wasn't sure if this was needed since it was all disabled; but I kept it just incase), HNE Death Siphon Aura Timer)

Edit 2: Removed attachment. Just going to send you a link to the map in a private message.
 
Last edited:
Status
Not open for further replies.
Top