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

Periodic spell change

Level 7
Joined
Jan 11, 2022
Messages
108
Hello!

I want to make a passive spell that will cast certain buffs in order

The idea:

After a research all units will gain "Ancient Buff" (I did a trigger to track all newly spawned units and give them that buff)

The idea of Ancient Buff is to give every unit "Inner Fire" buff for 60 seconds. After it's gone they'll gain "Rejuvenation" for 60 seconds, and after it's gone they'll gain Frenzy for 60 seconds. I don't know how to set it that it will track when each buff is gone from every individual unit. Also I was wondering if there's a way to track new units and give them EXACT buff that every unit has (So they all have the same buff, not in different orders)
 
Level 20
Joined
Aug 29, 2012
Messages
826
I think the very easiest way would be to have a dummy at the center of the map and give it auras with a 9999999 range, but they can't exactly reproduce all effects of these spells (like, endurance aura would work for a variant of frenzy, perhaps something like unholy aura for the HP regen of rejuvenation, but it's not the same)

That's a plan B at least and the advantage is that you would only have to replace 1 spell for 1 unit every minute, so that's super easy to implement.

Otherwise, I think you'll need to use an unit group, pick all units in that group every 60 seconds, use a dummy to cast the new spell on those units, and remove the previous buff. That being said, depending on your map, if you were to create a dummy for every unit, I think there'll be some lag spikes
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,546
If new units are always given the same exact buff do they still get the full 60.00 second duration of it?

For example:

You have a timer that runs once every 60.00 seconds.

When the timer expires it picks every unit with the Ancient Buff and gives them the next "bonus" Buff (fire/rejuv/frenzy).

Do they lose their previous bonus Buff?
Can they have more than one bonus Buff at a time?
Is it okay for units to have different bonus Buffs as long as they follow the rule of "new units get the same bonus buff"?

Edit:
I attached two example maps, global cycle is what I believe you want. You'll need to be on the latest patch to open them.
They use a Unit Indexer system, do NOT import it if you already have one in your map.

@Chaosium
A properly setup Dummy unit can cast any number of spells, any number of times, instantaneously (assuming those spells aren't Channeled over a duration).
It needs a Movement Type: None and Speed Base: 0 for this to work.
 

Attachments

  • Ancient Buff Global Cycle.w3m
    25.5 KB · Views: 2
  • Ancient Buff Normal Cycle.w3m
    24.2 KB · Views: 0
Last edited:
Top