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

[vJASS] Spell making Idea

Status
Not open for further replies.
Level 16
Joined
Mar 3, 2006
Messages
1,564
I thought of a spell named, Glass Shield or just shield where the caster creates a shield around him/her that shield absorbs damage then dissipates when the caster took total amount of X damage.

So I thought of creating a mana shield then do one of the following:


  1. Make the mana shield absorb damage 1 mana per 1 damage then calculate the amount of mana drained then subtract this number from a variable which represents the amount of damage the shield can absorb and in case the unit mana reached 0 then we use the life (but I guess that may interfere with other things)



  2. Use a damage detection system to subtract the amount of damage taken from the amount of the damage the shield can sustain.

So if anyone has better idea for making this spell with another efficient way, just share your thoughts.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
There are systems like Damage Engine (Bribe) that allows manipulating Damage.

You can create X buff and special effect in the unit and store the damage received in a hashtable or an array. When the damage reaches the limit you want, remove the buff, remove the special effect, and dissipate the stored damage.
 
Status
Not open for further replies.
Top