• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Lightning Storm Spell

Status
Not open for further replies.
Level 6
Joined
Apr 26, 2007
Messages
225
Ok guys, i realy need help. Ive been working on a spell for like 2 hours and cant figure out how to do it. I wan to create a spell that will be a starfall with lightning bolts instead of starfall [target] and each time a bolt hit a target, a chain lightning that hit 10 targets is casted on the unit.

Thanks a lot to the person who can help me but i'll only be back tomorrow am goin bed lol
 
Level 6
Joined
Apr 26, 2007
Messages
225
I tried using starfall as the base and changing the stafrall [target] model into lightning bolt, it just made an invisible starfall (...) then i tried triggering the chain lightnings but i have no idea how lol. In my life i made rpgs, mauls, tds and all but i never tried to make a spell via trigger like this one so i realy need help.
 
Use channel as the basic spell, then when the spell is cast do:
events:
every x seconds (timer)
actions:
Pick every unit within y distance of caster matching unit is alive, unit is an enemy of owner of casting unit, unit is not invulnerable to magic and do:
create a special effect on the unit using model "lightning bolt"
make a dummy unit cast a dummy version of chain lightning on target.
 
Level 6
Joined
Apr 26, 2007
Messages
225
I still have a few problems lol the spell has 10 levels, the chain lightning does 10 more damage per level. And for the dummy you mean i spawn one etch lightning bolt and it cast far seer chain lightning right? so i modify the far seer's spell DIRECTELY?

i apreciate your help.

EDIT: by the spell chanel what do you mean? am wrong to use starfall? i dont know of any "chanel" spell..?

EDIT2: Nevermind i know what you mean by channel XD i just woke up am a litle sleepy lol sorry for the stupid misstake so ignore my edit1
 
Yes you modify the far seer's spell directly. You can make the modification of it have multiple levels, then you just set the level with a trigger when you create the dummy. I didn't mean to have the actual lightning bolt cast chain lightning, that was only supposed to be SFX, but if you want, you can make the lightning bolt be the dummy unit too I suppose.
 
Level 6
Joined
Apr 26, 2007
Messages
225
I cant seem to get it to work...
  • lightning storm cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
      • Set lightningstorm_chanellingguyT1 = (Casting unit)
      • Trigger - Turn on lightning storm <gen>
      • Wait 30.00 seconds
      • Trigger - Turn off lightning storm <gen>
  • lightning storm
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 900.00 of (Position of lightningstorm_chanellingguyT1) matching ((Owner of (Picked unit)) Equal to Player 9 (Gray))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • Special Effect - Create a special effect attached to the foot of (Picked unit) using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
              • Unit - Create 1 magedummy for (Owner of lightningstorm_chanellingguyT1) at (Position of (Picked unit)) facing Default building facing degrees
              • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
              • Wait 0.50 seconds
              • Unit - Remove (Last created unit) from the game
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
Here is what i used... dint try to make it for levels, i tried a lot of things and ended up with that lol

Whats weird is that it work if i do:

  • lightning storm
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 900.00 of (Position of lightningstorm_chanellingguyT1)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
              • Special Effect - Create a special effect attached to the foot of (Picked unit) using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
              • Unit - Create 1 magedummy for (Owner of lightningstorm_chanellingguyT1) at (Position of (Picked unit)) facing Default building facing degrees
              • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
              • Wait 0.50 seconds
              • Unit - Remove (Last created unit) from the game
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
And i am sure, the units are gray's unit. It's for a hero defence like map where all creeps are owned by player 9 gray.
 
Level 8
Joined
Aug 4, 2006
Messages
357
Good job getting it to work so far.

  • Unit Group - Pick every unit in (Units within 900.00 of (Position of lightningstorm_chanellingguyT1) matching ((Owner of (Picked unit)) Equal to Player 9 (Gray))) and do (Actions)
needs to be changed to
  • Unit Group - Pick every unit in (Units within 900.00 of (Position of lightningstorm_chanellingguyT1) matching ((Owner of (Matching unit)) Equal to Player 9 (Gray))) and do (Actions)
Use matching unit to refer to a unit that should match a condition. Use picked unit only inside the loop actions.

You should take the actions out of the if/then/else since there is no condition. It's also kind of weird that you're looping through the units every 1 second, with a .5 second wait in there. What happens if there are more than 2 units in the unit group?

Just so you know, this spell (in its current state) will cause your map to lag over time since it contains Point and Unit Group leaks. It will not work if more than one unit tries to cast the spell at one time.
 
Level 6
Joined
Apr 26, 2007
Messages
225
Sorry for a double posting but i have a last prob and editing my message will just look like i never replied back so..

How do i make a unit with an expiration timer? By the way the wait was expecialy for the lightning bolt to last but now i have deleted the Unit - kill and wan to make an expiration timer its a good idea but i never tried that ^^ i alway found a way around before lol (its true that all me triggers are alway full of leaks...)

Also about the if/then/else i just forogt to delete it because it had a condition before. If i add the spell levels, should i make 10 if/then/else inside the loop or make 10 loops inside 10 if/then/else?
 
Level 6
Joined
Apr 26, 2007
Messages
225
Oh my got i came up with it at last but now there's a BIG problem... the chain lightning goes crazy and do the whole map and hunt down all enemies lol i need a ultimate spell but not that ultime lol it has to be balenced...

EDIT the spell never hend and all my spells now creats tons of dummy that cast the chain lightning well here's my trigger if someone can find a solution:
  • lightning storm cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
      • Set lightningstorm_chanellingguyT1 = (Casting unit)
      • Trigger - Turn on lightning storm <gen>
      • Wait 30.00 seconds
      • Trigger - Turn off lightning storm <gen>
  • lightning storm
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 900.00 of (Position of lightningstorm_chanellingguyT1) matching ((Owner of (Matching unit)) Equal to Player 9 (Gray))) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 magedummy for (Owner of lightningstorm_chanellingguyT1) at (Position of (Picked unit)) facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit)
          • Wait 0.50 seconds
          • Unit - Remove (Last created unit) from the game
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect attached to the foot of (Picked unit) using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
EDIT2 By the way, no lightning bolt ever apear, when i cast the spell, tons of dummies apear and thats it (depending on how many enemies are there
 
Don't attach lightning to "foot". Some models don't have "foot". All models have "origin", however, and that's where it should be attached to. Also, you try to destroy the SFX before it's even created? Oh, and like I said, waits don't do anything in pick every unit group actions.

The problem with chain lightning bolts going all over the map is to do with you modding the dummy spell wrongly. You kinda need to make the dummy units invisible (or so small they're invisible) and locusted and invulnerable too.
 
Level 6
Joined
Apr 26, 2007
Messages
225
They are small i don't see them, the problem is that they chain every single unit of the map, its a line where creep come from the left and go to the right (like abyss gate if you know) and they chain all units within 900 range instantly and then continue to chain and spawn till there's no creep to attack...

For the lightning bolt i will try but later so well am gonna check back the topic tomorrow and i appreciate you taking the time to help me this much.
 
Level 6
Joined
Apr 26, 2007
Messages
225
Object editing? what is that suppose to mean?

I am an experienced map maker, but in my way because am skilled with triggers and I can do most likely anything except for things I cant go around in some way, like here. All I ever did was mess around with triggers, place units regions and do terrains and edit units or spells, Ive never edited a doodad or destructible (if thats even what your talking about loll) so if there is something new I have to learn well teach me the basic please, I'll do the rest just like when I started map editing, all on my own with the hive to support me in some way :at:

EDIT: by the way your TD look awesome, Ele, you think your gonna release it soon? Couldn't find any date or maybe its too early to tell?
 
Level 6
Joined
Apr 26, 2007
Messages
225
For the lightning spell, I only took the real one and changed the damage and number of units it can hit, witch is 10 so its suppose to do (on a pack of many enemies) a big rain of lightning bolts with tons of chain lightning but in an area of 900 around my char lol not the whole map.

By the way for the TD i can be a tester if you wan it look nice and i dont mind if its not unique yet lol
 
You must have changed the maximum range between bounces or whatever.

A few problems:
-There's only 1, completely OP kind of tower so far lol
-Only 10 different waves so far
-The multiboard doesn't function yet
-So far nothing happens when the creeps get through. They just sit there.

So no, you cannot test it right at this moment. Maybe in a couple of weeks it will be testable.
 
Level 5
Joined
Aug 6, 2004
Messages
131
i think he might mean, is there a way to end then chain lightning once it goes out of 900 range? its quite possible that his chains since they hit 10 targets keep going along the spawn line into the spawn.
 
Level 6
Joined
Apr 26, 2007
Messages
225
Yes, thats the problem. I wan the maximum radius inside a 900 range but now what happens is that creeps that come my way alway get hit.

I also just noticed that even after the 30 sec, the spell never ends. Not the actuals bolts but whenever i cast a spell it mass chain lighining the group of mobs.

WILL I EVER BE ABLE TO GET IT TO WORK RIGHT?! OMG!! loll
 
Level 12
Joined
Dec 10, 2008
Messages
850
Well if you only want it to affect units within 900 range, you might have to trigger that too, since Chan Lightning automaticlly goes after the closest unit within a certain range

Also, coudn't the two triggers become one? This isn't very MUI ATM.

Edit1: That If/Then/Else might be causing problems. And doodad effects normally dont apear using Special Effect actions. Use MonSoon Bolt.

Edit2: Heres the monsoon bolt path Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
 
Status
Not open for further replies.
Top