How to cast paladin's Divine Shield on other allied units?

Zerox

Ultra Cool Member
Reaction score
28
Hey I'm trying to recreate a the Unholy Armor skill from wc2 which grants temporary invulnerability to one unit but isn't usable on the caster. To do this I thought why not just use Divine Shield and make it castable onto other allied units but not the caster themself.

Only problem is I can't figure out how to do this. Can anyone help me? I'll give +rep to anyone who tries to help. :thup:

Zerox
 
Use trigger:
Trigger:
  • TRIGGER
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Unit - Make (Target unit of ability being cast) Invulnerable
      • Wait 10.00 game-time seconds
      • Unit - Make (Target unit of ability being cast) Vulnerable
 
Use trigger:
Trigger:
  • TRIGGER
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Unit - Make (Target unit of ability being cast) Invulnerable
      • Wait 10.00 game-time seconds
      • Unit - Make (Target unit of ability being cast) Vulnerable

That's a bad trigger. Waits never work that well, plus I think that leaks. Also there is no special effect or buff to show the unit is invulnerable.

When you get the unit to cast a dummy spell, add a disabled spell book to the hero. Put the divine shield spell in there and get the target to cast it.
 
I suggest you don't use divine shield as a base spell. Divine shield has a buff called divine shield I think (or maybe invulnerability). Take an allied target casting spell like....Regeneration (Druid of the Claw), set the amount regened to 0, and give it the same buff as divine shield would. Then just alter the art.
 
My trigger works, but it schould be upgraded. It probably leaks, so add point variable and set it to Target of ability being cast. And replace wait with timer.
 
Trigger:
  • Test
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Unit - Add Divine Shield to (Target unit of ability being cast)
      • Unit - Order (Target unit of ability being cast) to Human Paladin - Activate Divine Shield
      • Unit - Remove Divine Shield from (Target unit of ability being cast)
 
That will add icon of Divine Shield to target unit for a period of duration.
 
Not visually. It uses it the same second it dissapears since divine shield is instant and have time to be used during. It may however interrupt channels etc.
 
Event
A unit starts the effect of an ability
Condition
Ability being cast equal to Something
Actions
Set Target = Target Unit of ability being cast
Make Target Invulnerable
<<Add the divine shield special effect to the origin of the target>>(Sorry forgot the command)
Set Effect = Last Created Special Effect
Wait 10 game time seconds
Make Target Vulnerable
Destroy Effect

Something = A dummy ability with no buffs and effects. Chain Lightning is a good dummy ability base.

This is one way you can do it. Its not very good as its not so effective if you want to cast it within the time period given as the unit stored into variable changes. Hence it will cause more problems.

Here is another way for you to do it.
Base a dummy spell of rejuvenation.
Set the amount healed to 0.
Set the duration(How long the divine shield would last)
Create a new positive buff(based off rejuvenation or even divine shield would be fine), this makes the description of the buffs come out green instead of red on a negative buff. Change the effect to the divine shield effect, change the description to whatever you like.
Go back to your ability and set the buff to the new buff you created.

Make a trigger like this.
Code:
Trigger
    Events
        Time - Every 0.25 seconds of game time
    Conditions
    Actions
        Custom script:   set bj_wantDestroyGroup=true
        Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
            Loop - Actions
                If (((Picked unit) has buff Divine Shield** ) Equal to False) then do Unit - Make Picked Unit Vulnerable else Unit - Make Picked Unit Invulnerable

The divine shield buff is the new buff you created.

This trigger is much better as it doesn't involve any variables. The spell would then be MUI, you could continuously cast it as many times as you like without any problems.

Hope it helps :D
 
I appreciate all of your help and I think they all made sense and would work to an extent but lh2705's second method seems to be the best way we've figured out and so I'll use that. Thanks everyone. The simpler stuff helped me understand his to an extent more and I appreciate it. I'll give +rep to all as promised.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top