Custom Divine Shield

Templarion

Member
Reaction score
8
I know. There are other threads like this but they didn't help me.

First I made the ability based on Divine Shield but it didn't work and I read (from other threads) that the invulnerability-part is made by trigger anyway. So, my custom "divineshield" is based on "invisibility" at the moment. But only thing that happens when spell is cast that the unit turns invisbile. (Suprise :) )

Here is the trigger that I am using to make TARGETED UNIT INVULNERABLE:

Event:
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to divineshield
Actions
Unit - Make (Targeted unit) Invulnerable

What is supposed to happen? Unit turns invulnerable for 66 seconds NOT INVISIBLE. Spell is casted by NON-hero unit.
 

Templarion

Member
Reaction score
8
Didn't help. I want that the targeted unit becomes invulnerable. Should I change the spell where "divineshield" is based on? (It is invisibility if you remember correct and I don't want the unit become invisible.)
 

WastedSavior

A day without sunshine is like, well, night.
Reaction score
217
why base off invis? use nova shield, from lich, it wont give invis.. just remove buffs from nova shield, make the armor given 0, and then use a trigger like

Event
A spell is cast
Condition
ability equal to "your spell"
event
Make targeted unit invulnerable
wait 30 seconds
make unit vulnerable

thats just a ruff thing =o
 

Templarion

Member
Reaction score
8
Did NOT work.

1) I created my divineshield again - now based on "Frost Armor".
2) Removed buffs and armor values.
3) Modified my trigger which now looks like this:

Events:
Unit - A unit Begins casting an ability
Conditions:
(Ability being cast) Equal to Unholy Armor
Actions:
Unit - Make (Targeted unit) Invulnerable

4) I first tried with Actions: +Wait 66 sec. & +Make vulnerable but it didnt work. After that I tried without those two actions and it didnt work this time either.
5) At least the unit didnt turn invisible this time.

If I create the "divineshield" spell based on "Divine Shield" it works well but I CANT TARGET OTHERS than self. That cannot be repaired by changing "Targets Allowed".
 
D

Dipski

Guest
Okay, I just did it like this based off of invisibility
Code:
Untitled Trigger 001
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to <your ability here> 
    Actions
        Unit - Make (Target unit of ability being cast) Invulnerable
- Make sure you change the name of your ability, so it's not the same as any others
- Change Art - Target in the ability editor to nothing
- Change Art - Target Attachment point to nothing
- Change Stats - Buffs to Divine Shield
 

Templarion

Member
Reaction score
8
Thanks for you Dipski, the spell now makes a targeted unit invulnerable BUT the divineshield looks like lasting forever. I would like to wear it off after 66 seconds.

Why this trigger doesn't work? It only makes an unit invulnerable:

Events:
Unit - A unit Begins casting an ability
Conditions:
(Ability being cast) Equal to divineshield
Actions:
Unit - Set life of (Target unit of ability being cast) to 50.00%
Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\NightElf\Immolation\ImmolationTarget.mdl
Unit - Make (Target unit of ability being cast) Invulnerable
Wait 66.00 seconds
Unit - Remove All buffs from (Target unit of ability being cast)
Unit - Make (Target unit of ability being cast) Vulnerable


And thanks for you patience Wasted Savio, too.
 

Templarion

Member
Reaction score
8
I changed "Wait" from "66" to "5" and it still look like lasting forever, well at least it lasted more than 2 minutes and that is far too much.

Thanks for the idea Ace, but it didnt work.

Any other ideas?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
The looks of that effect probably stay until you actually remove that special effect.
However, does the unit turn back to vulnerable after those 5 seconds?
 

Templarion

Member
Reaction score
8
I want that the effect and the invulnerability stop after 66 second. "I want them both down!!" :banghead:

I tested unit's invulnerability by trying to kill it and looking it's armor class.

No effect nor invulnerability stop. They both last forever (at least more than 2 minutes).

I tried this with "Wait 5 seconds"-action and "Wait 66 seconds"-action. Neither works.

Any other ideas?
 

Templarion

Member
Reaction score
8
First this trigger.

Trigger:

Event:
+Unit - A unit Begins casting an ability
Condition:
+(Ability being cast) Equal to Unholy Armor
Actions:
+Unit - Set life of (Target unit of ability being cast) to 50.00%
+Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\NightElf\Immolation\ImmolationTarget.mdl
+Unit - Make (Target unit of ability being cast) Invulnerable
+Wait 5.00 seconds
+Special Effect - Destroy (Last created special effect)
+Unit - Make (Target unit of ability being cast) Vulnerable

Ok guys. Now this gets a little bit more weirder:

First I thought things work fine except the INVULNERABILITY lasts forever (at least the special effect stops after 5 seconds).
BUT when I cast this spell first with one mage to target and before the spell wears off I cast the same spell with another mage to another targer -----> The target of the first cast spell stays under the effect AND under the invulnerability.

1) So, something is wrong with the line: "Unit - Make (Target unit of ability being cast) Vulnerable".

2) I want that the spell can be used my multiple mages to multiple targets without bugs of ever lasting enchantment.
 
N

Neopolis3

Guest
"+Special Effect - Destroy (Last created special effect)"
If you have multiple spells casted, it might not be the correct one being deleted.

Yeaahh... That's complicated. You might use array variables, but since they are not of endless size (Which is very annoying), you could only have a limited number of shields at the same time.

I advise just giving that target unit "Divine Shield" for a second, letting it use it, remove it again, and put it to 66 seconds, giving it your stats and stuff. The problem is, it might give bugs if you use it and them remove it. I don't know, I never tried this.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
A local variable keeping the target unit.


> "Divine Shield" for a second, letting it use it, remove it again

If the ability disappears, so does its effect.
 

Templarion

Member
Reaction score
8
Thank you for your answers.

AceHart, could you be more specific with your idea? I am not very familiar with trigger editor.

Is still need a solution for this matter. Please help.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Some ability that puts a buff and a renewable duration. Rejuvenation or something.

Code:
DivineShieldCast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Divine Shield (Castable)
        ((Target unit of ability being cast) is in Invulnerables) Equal to False
    Actions
        Unit - Add Invulnerable (Neutral) to (Target unit of ability being cast)
        Unit Group - Add (Target unit of ability being cast) to Invulnerables

Code:
DivineShieldActive
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        (Invulnerables is empty) Equal to False
    Actions
        Unit Group - Pick every unit in Invulnerables and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Divine Shield) Equal to False
                    Then - Actions
                        Unit - Remove Invulnerable (Neutral) from (Picked unit)
                        Unit Group - Remove (Picked unit) from Invulnerables
                    Else - Actions

That might just work.
At least, that what's I would try... YMMV ;)
 

Templarion

Member
Reaction score
8
Thank you very much AceHart for the code and especially making the code easier to read. (Before you edited it, it took time to find out what you meant.)

Though, something doesn't work.

The Invulnerability does not activate right away but it must be clicked before it activates. I want it to activate right after the spell (which activates the triggers) is cast. How do I do this? And what happens to the ability (even if it is activated) when it gets removed (note the event "every 1 second")? Does the effect of an activated ability last of it's duration even if it gets removed?
 

Templarion

Member
Reaction score
8
Yes. I definitely found some inspiration from your demo map. My problem number one was that I set value 0 to "Data - Hit points gained"-field. That's why I was not capable to target any units and this lead me to try other ideas.

Anyway, if anyone is looking for CUSTOM DIVINE SHIELD see above AceHart's demo map.

Thank you for your patience and help everyone - especially AceHart.

THIS CASE IS CLOSED.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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