Auto Cast Upgradable Chain Lightning

und34d-rul3

New Member
Reaction score
12
Ok, I want to do a few things. What I want to happen is to have Chain Lightning auto cast from a tower, and I want it to be upgradable so at level 1 it hits one target, level 2 it hits two, and level 3 it hits three. Anyone know how you would do this?
 

Ghostwind

o________o
Reaction score
172
I don't think you can make it autocast in the sense that it has the little ring of shinies going around it when you right click it. But you can give it the Lightning Orb ability, and just mess around with it in object editor.

Hope that helped =)
 

und34d-rul3

New Member
Reaction score
12
I don't need the gold shining ring, in fact I would prefer to not have it. If you've ever played wintermaul with electric and used the chain lightning tower, I want it to be like that, but upgradeable.
 

Dregonx

TH.net Regular
Reaction score
21
Use Orb of Lightning (new) item ability, and change the purge ability to chain lightning, then just make several ranks of it, and make it with some triggers where it'll be upgradeable.

Edit: Not sure if giving the Orb of Lightning (new) ability to a unit or hero will still enable it to be autocast or not if you change it to a unit or hero ability, but if so then what I posted should work.
 

und34d-rul3

New Member
Reaction score
12
Not sure what you mean by that, and how I would do that. Could you please explain a little more. And like I said it is going to come from a tower.
 

Dregonx

TH.net Regular
Reaction score
21
Map is finished, I'm going to add an attachment and let you download it, to look at everything how it's done. You may edit the values yourself to your liking.
 

Attachments

  • chain lightning tower 1.1.w3x
    19.6 KB · Views: 79

und34d-rul3

New Member
Reaction score
12
That doesnt work, I played it and researched chain lightning but it was dimmed and wouldn't attack.
 

Dregonx

TH.net Regular
Reaction score
21
That doesnt work, I played it and researched chain lightning but it was dimmed and wouldn't attack.

You need to let it attack first, then while it's attacking upgrade it. Don't know why it's like that, probably a glitch, but as far as the dimmed part, I can't fix that, if you want an auto chain lightning that is clickable then I'll work on it tomorrow(However this alternate chain lightning will not be nearly as good as the one in the map, you just have to deal with the dim)
 

und34d-rul3

New Member
Reaction score
12
Idk what you mean, it doesn't need to be clickable, but it wasn't casting chain lightning at all.
 

Dregonx

TH.net Regular
Reaction score
21
Ok, I made a better version.

When you start up the map, do not upgrade at all until you have seen at least one chain lightning go off. (It's a glitch that I have no idea how to fix, but just do it.)

The towers and footmen, have HP regen now so nothing can die.

Edit: Delete the other map you downloaded and get the new one I attached. Also for some reason, the towers stop attacking once in a while, just wait for a little bit and they will start attacking again. (Probably from so many footmen attacking.)
 

vypur85

Hibernate
Reaction score
803
The problem with Orb of Lightning is that you need to actually 'attack' the unit before the ability can be activated. There's a difference between 'attack' and 'auto-attack'. If the unit auto acquire its target, the chain lightning won't get activated. If you manually attack your target (using 'attack' or 'smart' or 'right click') then it will get activated.

You can simply test this by just selecting your tower, and right-clicking the targets. It will cast chain lightning.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
If you want a Chain Lightning to be cast everytime the tower attacks, well, just give the tower some low damage, and detect when the tower attacks, order the Tower itself to cast Chain Lightning on the attacked unit.
 

und34d-rul3

New Member
Reaction score
12
Ok, heres what happens in my game. The tower will not be attacked at all. The tower will have a normal attack type which will be used, but I want a secondary lightning attack that can bounce, chain lightning. The target for chain lightning should be somewhat random, and it shouldn't be based on what the tower is attacking.
 

Dregonx

TH.net Regular
Reaction score
21
The problem with Orb of Lightning is that you need to actually 'attack' the unit before the ability can be activated. There's a difference between 'attack' and 'auto-attack'. If the unit auto acquire its target, the chain lightning won't get activated. If you manually attack your target (using 'attack' or 'smart' or 'right click') then it will get activated.

You can simply test this by just selecting your tower, and right-clicking the targets. It will cast chain lightning.

Is there any other way of making it work the way we're talking about here?
 

vypur85

Hibernate
Reaction score
803
> Is there any other way of making it work the way we're talking about here?

Code:
Test
    Events
        Unit - A unit Is attacked
    Conditions
        (Level of Orb of Lightning (new)  for (Attacking unit)) Greater than 0
    Actions
        Trigger - Turn off (This trigger)
        Unit - Order (Attacking unit) to Attack (Triggering unit)
        Trigger - Turn on (This trigger)

This might make it work. But somehow the Lightning is not casted on the first attack. Not sure why.


Or trigger the whole thing :p:
Code:
Test 2
    Events
        Unit - A unit Is attacked
    Conditions
        (Level of Devotion Aura for (Attacking unit)) Greater than 0 <-- [I]Devotion Aura is just a dummy ability that does nothing[/I]
    Actions
        Set Z_Unitgp_General = (Units within 512.00 of (Position of (Attacking unit)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and (((Matching unit) is alive) Equal to True))))
        Unit - Create 1 Footman for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
        Unit - Add Chain Lightning to (Last created unit) <-- [I]Make sure C Lightning does not require mana and has decent casting range.[/I]
        Unit - Set level of Chain Lightning for (Last created unit) to (Level of Devotion Aura for (Attacking unit))
        Unit - Hide (Last created unit)
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Random unit from Z_Unitgp_General)
 

PooBucket

New Member
Reaction score
12
What he means is casting auto. Not chance like Orb of Lightning, it's clear what he wants..... Why not base off an ability that is auto-cast and uses that ability when an enemy is near by, and when you cast you get a dummy unit to cast chain lightning?
Else if you don't want those shining things, you could have something detecting when a unit comes near it.... But unfortunately that's specific unit. If you unit is a specific unit, (not when built) go unit within range and then actions - chain lightning.
 

und34d-rul3

New Member
Reaction score
12
Ok I think I have most of it working, but I have 2 questions:
1) How can I make it so a trigger will turn auto cast on for the ability every second, or is there a better way to make sure auto cast is always on?

2) I used heal as the ability to use for auto cast, but it doesn't target anyone at full health, is there a way to fix this? (Already changed amount it heals to 0)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • 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

      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