Lightning Shield that damage enemy only

Volkof

Well-Known Member
Reaction score
31
How do u make a lightning Shield that can only be casted on friendly units and the lightning will only damage enemy units.
I've searched the forum but to no avail.

I tried changing Stats- Targets allowed = Enemy, Ground, Neutral
If i do that I can't change lightning shield on friendly units.

I tried changing Stats- Targets allowed = Friend, Ground, Neutral
If i do this, it will damage all friendly units around target



Thks in advance
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
If you have tried all opportunities I suggest you do it with a trigger:
Event: A unit starts the effect of an ability
Condition: Ability = lighnting shield
Actions: Set lightningcaster= Casting Unit
Turn on "Trigger2"

Trigger2:
Event: time every 1. second
Condition: lightningcaster = Alive =true (boolean)
Actions: Set lightninggroup = Every unit within 200 range of lightningcaster
Pick every units in ligthninggroup and do : Unit - Damage with X dmg to picked unit...
call DestroyGroup(udg_lightninggroup)
;)Ofc, you need to turn this off sometime also...or dont have to but..lol
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
True, im too fast your you? aint I? :)
Well...if you dont like that "trigger" there Vokofe you can do it like this:
Code:
EVent: a unit starts the effect of an ability
Condition: Ability = lightning shield (has 0 dmg, lasts X seconds, aoe 66, so you are SURE none units are being damaged by this lightning shield... Oh,you also need to change targets allowed to... those you just want the shield to be cast on)
Actions: Add Permanent Immolation (that is customized...with X levels, as many as your lightnign shield) to Target order of ability being cast ...
Unit - Set level of Permanent immolation for (Target unit of ability being cast) to ( Level of Lightning shield ( for casting unit))
then wait as long as you want the immolation/lighnint shield :P to last... and simply remove the ability from the target...Oh, yes you need variables to "store" target of ability...:)
Cheerio;)
 

Anachron

New Member
Reaction score
53
I forgot how, but one day I found out how to make it able to cast on everything, maybe I did it in jass, checking this out. Also if you want to make lightning shield permanent , you can set duration time to 0, this will make it permanently on unit. To remove this spell, use triggers. Simply remove buff. Those effects will end then.. ;)
 
T

Twyddli

Guest
If you make two abilities, make one of them based off, umm... I suggest Holy Light, lets call this Lightning Shield(Activation), then make the other one based on permanent immolation, call it Lightning Shield(Damager).

Next, give your hero the ability to cast it, then you need to make a trigger something like this.

Code:
Event
    Unit - A Unit starts the effect of an ability
Condition
    Ability being cast equal to (Lightning Shield(Activation)
Actions
    Unit - Add Lightning Shield(Damager) to targeted unit.
    Unit - Set Level of Ability Lightning Shield(Damager) for Targeted Unit to Level of Lightning Shield(Activation) of Triggering Unit
    Wait - an amount of seconds.
    Unit - Remove Lightning Shield(Damager) from Targeted unit.

These Triggers are not exact, and you may have to look a bit to find the targeted unit. And what this is supposed to do is... When you cast the ability Lightning Shield(Activation) it puts the other ability onto your target, then sets the level of the ability, waits the amount of time, then removes the buff.

Also, the (Activation), and (Damager) are only Editor parts, only show in editor. You also will have to set all the effects in Lightning Shield(Activation) to 0 so it doesn't heal your target. And you change Lightning Shield(Damager) stuff to the amount of damage you want done. You can also change the effect image.

Sorry if this is a little Confusing :nuts:

Hope it helps some. Good Luck ;)
 

Volkof

Well-Known Member
Reaction score
31
Thks

Thks ManyTimes for your trigger. I modified it further so it will only damage enemy units.
I also want to thk Twyddli for trying to help me :D

PS: by the way, do u guys know that there is a bug with permenent immolation? U can't have that ability with multiple levels of different damages.


NEW PROBLEM!
__________________________________________________________
Heres my new trigger:

Code:
Lightning Shield Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Lightning Shield 
    Actions
        -------- Electro = lightningShieldCaster --------
        Set lightningShieldCaster = (Casting unit)
        -------- Units with lightning Shield --------
        Set Num = (Num + 1)
        Set lightningShieldTarget[Num] = (Target unit of ability being cast)
        Trigger - Turn on Lightning Shield Damage <gen>
        -------- If Num reaches max --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Num Equal to 1000
            Then - Actions
                Set Num = 0
            Else - Actions

This one is off:
Code:
Lightning Shield Damage
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        (lightningShieldTarget[Num] has buff Lightning Shield [Target]) Equal to True
    Actions
        Set lightningShieldGroup[Num] = (Units within 200.00 of (Position of lightningShieldTarget[Num]))
        Unit Group - Pick every unit in lightningShieldGroup[Num] and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) belongs to an enemy of (Owner of lightningShieldCaster)) Equal to True
                        ((Picked unit) is alive) Equal to True
                    Then - Actions
                        -------- Level 1 --------
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Lightning Shield  for lightningShieldCaster) Equal to 1
                            Then - Actions
                                Unit - Cause lightningShieldTarget[Num] to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Normal
                                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Weapons\Bolt\BoltImpact.mdl
                            Else - Actions
                                -------- Level 2 --------
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Level of Lightning Shield  for lightningShieldCaster) Equal to 2
                                    Then - Actions
                                        Unit - Cause lightningShieldTarget[Num] to damage (Picked unit), dealing 35.00 damage of attack type Spells and damage type Normal
                                        Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Weapons\Bolt\BoltImpact.mdl
                                    Else - Actions
                                        -------- Level 3 --------
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Level of Lightning Shield  for lightningShieldCaster) Equal to 3
                                            Then - Actions
                                                Unit - Cause lightningShieldTarget[Num] to damage (Picked unit), dealing 50.00 damage of attack type Spells and damage type Normal
                                                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Weapons\Bolt\BoltImpact.mdl
                                            Else - Actions
                                                -------- Level 4 --------
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (Level of Lightning Shield  for lightningShieldCaster) Equal to 4
                                                    Then - Actions
                                                        Unit - Cause lightningShieldTarget[Num] to damage (Picked unit), dealing 65.00 damage of attack type Spells and damage type Normal
                                                        Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Weapons\Bolt\BoltImpact.mdl
                                                    Else - Actions
                                                        -------- Level 5 --------
                                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            If - Conditions
                                                                (Level of Lightning Shield  for lightningShieldCaster) Equal to 5
                                                            Then - Actions
                                                                Unit - Cause lightningShieldTarget[Num] to damage (Picked unit), dealing 80.00 damage of attack type Spells and damage type Normal
                                                                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Weapons\Bolt\BoltImpact.mdl
                                                            Else - Actions
                                                                Do nothing
                    Else - Actions


Hopes its not too complicated.
I know there are leaks but i only handle them after I finish everything on my map. Anyway, what im trying to do is that for every level of Lightning Shield, it will do different amt of damage.

The problem is: I cant have 2 friendly units having lightning shield and dealing damage at the same time. Only the later unit will deal damage while the previous unit one will just have the lightning effect.
As u can see I tried to use array, which I though might work, but it didnt.

Hope I'm clear enough...
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Thks ManyTimes for your trigger.
"Anytime":)
PS: by the way, do u guys know that there is a bug with permenent immolation? U can't have that ability with multiple levels of different damages.
Actually you CAN or else I wouldnt mention it, but I could tell you how, but then again..blablabla..., but if you cannot make it, then use Unholy aura? just mark the values and click Shift+Enter and then you can have a negative value, so it degenerates (and check >File> Preferences>General >Check "allow negative numbers"...;) If I see many others also cannot get immolation to work, ill release the solution

The problem is: I cant have 2 friendly units having lightning shield and dealing damage at the same time. Only the later unit will deal damage while the previous unit one will just have the lightning effect.
As u can see I tried to use array, which I though might work, but it didnt.
Well, you are not doing as I told you to?:p Well, forget about the "num" integer variable, that you are counting...Thats just....yes;)
Try to do something like this:
Code:
Untitled Trigger 001
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        [COLOR="magenta"]lightningshieldBoolean[/COLOR] Equal to True
    Actions
        Set [COLOR="magenta"]lightPoint[/COLOR] = (Position of lightningtarget)
        Set [COLOR="magenta"]lightGroup[/COLOR] = (Units within 180.00 of [COLOR="magenta"]lightPoint[/COLOR] matching ((((Owner of (Matching unit)) is an enemy of (Owner of [COLOR="magenta"]lightningCaster[/COLOR])) Equal to True) and (((Matching unit) is A structure) Equal to False)))
        Unit Group - Pick every unit in [COLOR="Magenta"](lightGroup[/COLOR]) and do (Actions)
            Loop - Actions
                Unit - Cause [COLOR="magenta"]lightningCaster[/COLOR] to damage (Picked unit), dealing (10.00 x (Real((Level of Lightning Shield for [COLOR="magenta"]lightningCaster[/COLOR])))) damage of attack type Chaos and damage type Acid
                Set [COLOR="magenta"]specialeffectPoint[/COLOR] = (Position of (Picked unit))
                Special Effect - Create a special effect at[COLOR="magenta"] specialeffectPoint [/COLOR]using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
                Custom script:   call RemoveLocation([COLOR="magenta"]udg_specialeffectPoint[/COLOR])
        Custom script:   call DestroyGroup(udg_[COLOR="magenta"]lightGroup[/COLOR])
All variables are PINK!;) This is just the second trigger.. the first should set the variables and turn this on, you also need a function that turns this off..checking if the buff is there or not, and you dont need that boolean, or depends on....yeye, ull figure it out;):D
 

Volkof

Well-Known Member
Reaction score
31
Thks again manyTimes, but im busy on weekdays so i cant edit my map right now. I will do it asap and let u know if it works.


Actually you CAN or else I wouldnt mention it, but I could tell you how, but then again..blablabla..., but if you cannot make it, then use Unholy aura? just mark the values and click Shift+Enter and then you can have a negative value, so it degenerates (and check >File> Preferences>General >Check "allow negative numbers"...


Did u say that is a way solve the bug in permenent immolation, I mean instead of using a substitute spell, I would like to know :)
 
X

x_MnJ_X

Guest
Enemy only lightning shield

sorry if i stole one of your ideas but i didn't read any of the replies T_T
how about you use (F6) to create a new ability like Immolate or some damage shield
change the skin to lightning shield
change the dps to whatever
change the casting art to lightning shield...
and just change everything that says immolation to lightning shield (except for the Buff)
 

Volkof

Well-Known Member
Reaction score
31
Hi guys, finally my holidays are here, and I can get back to map making :)

New Questions:

1)I dont understand what is the Boolean lightningshieldBoolean for?
Code:
Untitled Trigger 001
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        [B]lightningshieldBoolean[/B] Equal to True
    Actions
        Set lightPoint = (Position of lightningtarget)
        Set lightGroup = (Units within 180.00 of lightPoint matching ((((Owner of (Matching unit)) is an enemy of (Owner of lightningCaster)) Equal to True) and (((Matching unit) is A structure) Equal to False)))
        Unit Group - Pick every unit in (lightGroup) and do (Actions)
            Loop - Actions
                Unit - Cause lightningCaster to damage (Picked unit), dealing (10.00 x (Real((Level of Lightning Shield for lightningCaster)))) damage of attack type Chaos and damage type Acid
                Set specialeffectPoint = (Position of (Picked unit))
                Special Effect - Create a special effect at specialeffectPoint using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
                Custom script:   call RemoveLocation(udg_specialeffectPoint)
        Custom script:   call DestroyGroup(udg_lightGroup)

_______________________________________________________________________________-

Well I followed (At least most of it) what ManyTimes' trigger. But the problem is still there, only the later unit with Lightning Shield will damage the enemy, the perviousunit wonldnt, where did I go wrong this time?

Code:
Lightning Shield Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Lightning Shield 
    Actions
        -------- Electro = lightningshieldCaster --------
        Set lightningshieldCaster = (Casting unit)
        -------- The Friendly unit = lightningshieldTarget --------
        Set lightningshieldTarget = (Target unit of ability being cast)
        Trigger - Turn on Lightning Shield Damage <gen>

Code:
Lightning Shield Damage
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        lightningshieldBoolean Equal to True
    Actions
        Set lightPoint = (Position of lightningshieldTarget)
        Set lightningshieldGroup = (Units within 200.00 of lightPoint matching ((((Matching unit) belongs to an enemy of (Owner of lightningshieldCaster)) Equal to True) and (((Matching unit) is A structure) Equal to False)))
        Unit Group - Pick every unit in lightningshieldGroup and do (Actions)
            Loop - Actions
                Unit - Cause lightningshieldCaster to damage (Picked unit), dealing (20.00 x (Real((Level of Lightning Shield  for lightningshieldCaster)))) damage of attack type Spells and damage type Normal
                Set ML_specialEffectPoint = (Position of (Picked unit))
                -------- Special Effect --------
                Special Effect - Create a special effect at ML_specialEffectPoint using Abilities\Weapons\Bolt\BoltImpact.mdl
                Custom script:   call RemoveLocation(udg_ML_specialEffectPoint)
        Custom script:   call DestroyGroup(udg_lightningshieldGroup)
 

Volkof

Well-Known Member
Reaction score
31
Ok I hav made further changes to my trigger. I also figured out y only the latter unit will deal damage while the previous wont. However I dont know how to solve it.


Code:
Lightning Shield Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Lightning Shield 
    Actions
        -------- Electro = lightningshieldCaster --------
        Set lightningshieldCaster = (Casting unit)
        -------- The Friendly unit = lightningshieldTarget --------
        Set lightningshieldTarget = (Target unit of ability being cast)
        Trigger - Turn on Lightning Shield Damage <gen>


Code:
Lightning Shield Damage
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        (lightningshieldTarget has buff Lightning Shield [Target]) Equal to True
    Actions
        Set lightPoint = (Position of lightningshieldTarget)
        Set lightningshield_EnemyGroup = (Units within 200.00 of lightPoint matching ((((Matching unit) belongs to an enemy of (Owner of lightningshieldCaster)) Equal to True) and (((Matching unit) is A structure) Equal to False)))
        Unit Group - Pick every unit in lightningshield_EnemyGroup and do (Actions)
            Loop - Actions
                Unit - Cause lightningshieldCaster to damage (Picked unit), dealing (20.00 x (Real((Level of Lightning Shield  for lightningshieldCaster)))) damage of attack type Spells and damage type Normal
                Set ML_specialEffectPoint = (Position of (Picked unit))
                -------- Special Effect --------
                Special Effect - Create a special effect at ML_specialEffectPoint using Abilities\Weapons\Bolt\BoltImpact.mdl
                Custom script:   call RemoveLocation(udg_ML_specialEffectPoint)
        Custom script:   call DestroyGroup(udg_lightningshield_EnemyGroup)


help, anyone?

thks in advance
 

Volkof

Well-Known Member
Reaction score
31
ok, let me explain. Lets say I have footman 1 and footman 2. When I cast Lightning Shield on Footman 1, everything works fine. But when I cast Lightning Shield on Footman 2, Footman 1 will no longer be able to damage any nearby enemies, even if he still has the buff.

Heres the map.
 

Attachments

  • Lightning Shield.w3x
    19 KB · Views: 92

cowmenace

New Member
Reaction score
22
Its Easier Than You Think!!!!!!!!

I wanted the same exact thing a month ago. All you need to do is copy immolation, change level(X)-stats-buff to lightning shield for each one (it makes a ball spin around you made of lightning) and art-effect to charm (makes lightning come down from sky) Then change icons and text your done. If u want reduce mana per interval to 0 so it doesnt drain mana. this is pretty easy....don't stress over it also you can look for the spell at hiveworkshop.com or wc3sear.ch
 
G

Goauld

Guest
I wanted the same exact thing a month ago. All you need to do is copy immolation, change level(X)-stats-buff to lightning shield for each one (it makes a ball spin around you made of lightning) and art-effect to charm (makes lightning come down from sky) Then change icons and text your done. If u want reduce mana per interval to 0 so it doesnt drain mana. this is pretty easy....don't stress over it also you can look for the spell at hiveworkshop.com or wc3sear.ch

To make it even more clear: Make custom Immolation (the passive one) and change its data to what you want your lightning shield do, change its buff to the lightning shield buff, if you want it to show no icon (looks better if it doesn't) create custom ability based on Spell Book (item ability) and put your custom immolation in the ability list (remove others), change your lightning shield ability to do no damage and create a custom buff for it which has no art but has tooltips and icon. Then the triggering part here is:

Create a player group variable named, for example, Players and add to map initialization these actions:
Code:
Do this for every player:
   Player Group - Add Player 1 (Red) to Players
Player Group - Pick every player in Players and do (Actions)
    Loop - Actions
        Player - Disable Your custom spell book  for (Picked player)

Then the actual triggers (create unit variable named TempUnit and unit group variable named TempUnitGroup):
Code:
Adding the ability
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Your custom lightning shield
    Actions
        Custom script:   local unit udg_TempUnit
        Set TempUnit = (Target unit of ability being cast)
        Wait 0.10 seconds
        Unit - Add Your custom spell book  to TempUnit
        Set TempUnit = No unit

Code:
Removing the ability
    Events
        Time - Every 0.20 seconds of game time
    Conditions
    Actions
        Set TempUnitGroup = (Units in (Entire map))
        Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Your custom Lightning shield ability's buff (the castable one) ) Equal to False
                        (Level of Your custom spell book  for (Picked unit)) Greater than or equal to 1
                    Then - Actions
                        Unit - Remove Your custom spell book  from (Picked unit)
                    Else - Actions
        Custom script:   call DestroyGroup (udg_TempUnitGroup)

You can use these triggers to make custom buffing abilities that would have bonuses that you can't normally get by modifying ability data (like critical strike buff).
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top