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

Trigger QuestionI

Status
Not open for further replies.
Level 24
Joined
Feb 9, 2009
Messages
1,787
is it possible to create a spell like:

Bone Armor (yes Diablo 2)

(gibberish)
This spell summons a barrier, The armor revolves around the Necromancer, protecting him against all attacks. Although enchanted, the armor does take damage and will eventually crumble.

(actual effect)
Effect: A protective shield that absorbs damage.
Bone Armor only protects the Necromancer from Physical Damage.

for better terms, basically a spell that takes a certain amount of damage and is destroyed when the shield's life is depleted.


And can it be basic triggering and not JASS or W/e nonsense.
 
Level 5
Joined
Mar 17, 2005
Messages
135
What trigger would i use to bypass the damage onto the variable and not the hero?

Don't have time to make it out. But I have some input.

You make a trigger saying something like this.
Event: Unit is attacked.
Condition: ALL are true: Attacked unit = <Your Hero>
Attacked unit = has buff <your spell>
Action: set shield = shield - damage taken. (you should have the value of shield somewhere else as an integer)
if: shield > 0
add health to hero = damage taken.
(If you want you can add a graphic here too showing it got blocked or whatnot)

Iv'e persoanlly never did this but I think it's a start. Maybe adding health to the hero would look wierd but I'm not sure how fast the health would update so i'm not to sure what it would look like. Another problem I see with my trigger is that if the hero has 4 life and takes 5 he will die before getting health restored (Am i right?).
 
Level 3
Joined
Aug 6, 2009
Messages
45
Isn't there already a spell like this in the game files, Mana shield or something?
You could set it to drain 0 mana per attack and set the amount of hp you want it to absorb in the object editor.
 
Status
Not open for further replies.
Top