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

[Spell] Large Mana Shield

Status
Not open for further replies.
Level 2
Joined
Sep 3, 2020
Messages
6
I was wondering if it's possible to make a larger mana shield, like a dome of protection that surrounds all units within it and stops enemies from entering, or attacking the units inside.

And some thing else... if I make this spell, is there any way to set a variable for it? I mean like typing a certain amount of mana to be used to power the spell(When casting the spell), instead of draining it from the caster with each damage.
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
definitely possible, but if I understood you correctly, not really a mana shield in any way though :)

I would go about it like this:

first you need a basic spell trigger to start it all that defines the center of the spell (caster/cast point -however you want it to work) activated by a channel based dummy spell. create a unit group of all units in the range the shield covers. both allied and enemies (what I understood is that shouldn't kick out enemy units, just not let new ones enter) . turn on the looping trigger. and in the dummy spell you can define the mana cost.

periodic looping trigger : checks if any of the units in range of caster/cast point (however you want it to work), are enemies of caster that are not in the unit group, and if they are moves them out of range(using the angle between them and the center of the spell). checks if any units in the unit group are no longer in range and removes them from the group, and checks if any new friendly units entered spell-range and adds them to the group.

checks if units are attacking the friendly units inside the unit group and if so orders them to stop. (this will stop people from issuing attack orders even from far away, so if that is a problem, make this more sophisticated) [this one may need to be a separate trigger that starts with the event a unit is being attacked, and filter it so it only cares when the attacked unit is in the unit group.]



you also need to add a stop condition for the loop - do you want this spell to only continue while the caster is channeling, or is it a cast and leave ability like flame strike with a predetermined time for the shield to last?

If you need help fleshing it out maybe I can find time to help with that...
 
Last edited:
Level 2
Joined
Sep 3, 2020
Messages
6
Sorry if I don't understand all of it but I'm not good with triggers other than basic ones. So I created a dummy spell named "Shield" with Mana Flare as it's base.
I also created a variable of Unit Group, and the trigger to set the variable to units within 250 range of the caster, when the dummy spell Shield is cast by him. What do I do next?
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
I think I might just make this for you.

how do you want the spell to work - you cast it and it is on for x time, or that you can turn it on and off like mana shield? (If you make it activateable with only an initial mana cost, the player can just cast once and keep it on forever...)

is it a dome around the casting unit, or around the spot/unit he casted it on?

Edit: do you need the spell to be MUI? (can only 1 unit cast this at a time like in a MOBA or will multiple heroes need to be able to cast this? )
 
Last edited:
Level 2
Joined
Sep 3, 2020
Messages
6
It has no time limit, just like mana shield. And it's caster-centered, a dome of protection around the caster that shields units in it. Also everyone can cast it at the same time.
Thanks by the way.
But what I said about setting the mana cost above I actually meant that every time you cast it, you need to type how much mana you want to power the spell. I don't think that is possible though.

My initial idea was exactly a mana shield, but bigger so it can cover more units than just the caster.
 
Status
Not open for further replies.
Top