Hand of Protection

Elmo&Friends

New Member
Reaction score
0
This should be pretty simple however I'm still learning the ropes. I am trying to create a spell that a unit (this unit being quite strong) casts on other friendly or allied units directing the damage these units receive during the duration of the buff to the casting unit. No JASS please; I don't know it.
 

Zurtrogx

Active Member
Reaction score
24
It doesn't have to be in JASS.
I could do it for your, but I'm a bit too busy.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
You could always look for someone who has already made a spell like this, and then just tweak art and stuff.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Oh so not quite as simple as I had thought huh? Well I could foresee this being useful in many applications. Is there a tutorial on this?
No tutorial that I know of.

It's not quite so simple. :) The key components to a spell like this are:
  1. Detecting damage. It's not hard to set this up in GUI, but it's not very efficient and cannot be done without leaking. I'd suggest adding my GDD snippet that does all that for you, and works nicely with GUI.
  2. Linking the caster to the target, so you know which unit should instead take the damage. This could be done with hashtables, or a unit array and an autoindexer like AIDS, whereby you'd use the unit's custom value as the array index.
  3. Blocking the damage while still being able to know how much damage would have been dealt. This is typically done by temporarily giving the unit a +HP ability when it takes damage, then removing it an instant later. I do this in my Subversion spell.
 

Avaleirra

Is back. Probably.
Reaction score
128
Yes, the subversion spell weep made me works quite well, I highly recommend it :thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top