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

Shield Casting

Status
Not open for further replies.
Level 7
Joined
Jul 25, 2008
Messages
292
I want to build a unit that works as a shield generator. My basic plan is for it to be able to cast mana shields on other units, but when those other units are shot the mana comes off of the caster and not the unit its protecting.

Does anybody have any idea how I could make this work?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
You need a damage detection system to reverse the damage and drain the shields.

Then you could use hashtables to link the generator with the targets. When a target is damaged load the generator handle and if it has mana left, drain it and return life to the target.
 
Status
Not open for further replies.
Top