Charge Lightning Help

P

pete

Guest
Hey, i have this really complicated idea, but i just want to know if it's possable/how to do it.First i want the chain lightning to hit only 1 unit. Now i want it so when the chain lightning hits unit, it will either give a unit a buff that never runs out the will either be a possative charge or a negative charge, they will do nothing but if a unit with a possative charge touches a unit with a negative charge, they will make an explosion and die.
 
T

Techtrix

Guest
Sounds like a WoW boss..
I just had a quick look at the triggers and was trying to find a way to do it.
It looks like there is a way you could this, but i dont know enough about triggers or storing variables to tell you how to do it.
Sorry and good luck finding it!
 

Nerfpl

New Member
Reaction score
53
yea its possible. nothing complicated i think.
cast chain lighting, then trigger add charge(modifed 1 of 2 skills) based on random, after this save in varibles something like good_unit=xxxx bad_unit=xxxx
next trigger make when good_unit comes in range 20 to bad_unit, then pwn both. for multiple units can be harder

i can make it in map file if you want.
 

Tiber

Member
Reaction score
4
You will need the Chain lightning spell ("Charge").
Two buffing spells like Slow with separate buffs ("Positive", "Negative"). Duration should be set to 0 (when a spell with a duration is set to 0, it is permanent).
Two Unit Groups ("Pos group", "Neg group") in which you will store who has the positive buff and who has the negative buff.
An integer variable ("x") so you get the randomness.
A unit variable ("temp_unit").

Trigger 1:
- Events:
Unit casts 'Charge'.
- Conditions:
- Actions:
Set 'x' random number between 1 and 2.
If -
..x = 1
Then -
..Unit Create 1 dummy for owner of triggering unit at position of triggering unit
..Add "Positive" to last created unit
..Add a 2 second generic expiration timer to last created unit
..Order last created unit to Human - Sorceress Slow target unit of ability being cast
..Unit add target unit of ability being cast to 'Pos Group'
Else -
..Unit Create 1 dummy for owner of triggering unit at position of triggering unit
..Add "Negative" to last created unit
..Add a 2 second generic expiration timer to last created unit
..Order last created unit to Human - Sorceress Slow target unit of ability being cast
..Unit add target unit of ability being cast to 'Neg Group'


Trigger 2:
- Event:
Every 1 seconds
- Conditions:
- Actions:
Pick every unit in 'Pos Group' and do actions
..Set temp_unit = picked unit
..Pick every unit in 150 range,
....If -
......Picked unit has 'negative' buff
....Then -
......Unit explode and stuff
......Unit remove picked unit from 'neg group'
......Unit remove temp_unit from 'pos group'
....Else -
Pick every unit in 'Neg Group' and do actions
..Pick every unit in 150 range,
....If - unit has 'positive' buff
....Then -
......Unit explode and stuff
......Unit remove picked unit from 'pos group'
......Unit remove temp_unit from 'neg group'
....Else -
 
Reaction score
86
<< Tiber, just so you know that trigger will leak a lot :D (the units in range of 150 leaks.) But, it is mui, and it gets the job done. Very valid way of doing it :thup:
 

Nerfpl

New Member
Reaction score
53
i was trying to do it and actually im stuck at part when 2 units meet each other. Actually i thought i will be albe to make "unit come within 50 range of bad_unit" but i cant put varible in taht point :/

looks like that atm
Buff give:
Code:
Events
         Unit - Caster 0000 <gen> Begins casting an ability
Conditions
         (Ability being cast) Equal to Chain Lightning (custom)
Actions
         Unit - Remove Negative charge  from (Target unit of ability being cast)
         Unit - Remove Positive charge  from (Target unit of ability being cast)
         If (RandomNumber Greater than 5) then do (Unit - Add Positive charge  to (Target unit of ability being cast)) else do (Unit - Add Negative charge  to (Target unit of ability being cast))
         If (RandomNumber Greater than 5) then do (Set good_unit = (Target unit of ability being cast)) else do (Set bad_unit = (Target unit of ability being cast))
Charges are abilites with smillar buffs
Random Number: ( i wanted it outside because when it was inside, i noticed same cast scheme each time ;/)
Code:
Events
         Time - Every 0.50 seconds of game time
Actions
         Set RandomNumber = (Random integer number between 1 and 10)
 
P

pete

Guest
Thanks i think i've figured it out, anyways thanks a lot guys.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top