Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Places a flare on the targeted location that shoots lightnings at random enemy every 1.5 seconds (6 is the shooting limit(9 seconds)) or until is destroyed.
This Spell Is MUI
TRIGGERS(UPDATED)
LF Variables
Events
Map initialization
Conditions
Actions
-------- Setting the units --------
Set LF_CastingDummy = Casting Dummy
Set LF_FlareType[1] = Flare (Level 1)
Set LF_FlareType[2] = Flare (Level 2)
Set LF_FlareType[3] = Flare (Level 3)
Set LF_FlareType[4] = Flare (Level 4)
-------- Setting the units --------
-------- ---==========--- --------
-------- Setting Values --------
Set LF_MaxNumberofStrikes = 6
Set LF_StrikeTime = 1.50
Set LF_GroupAoE = 550.00
Set LF_NumberOfRandomUnits = 1
Set LF_GroupInteger = 0
-------- Setting Values --------
-------- ---==========--- --------
-------- Setting Abilities --------
Set LF_MainAbility = Lightning Flare
Set LF_DummyAbility = Chain Lightning (LF)
-------- Setting Abilities --------
-------- ---==========--- --------
-------- Adding Event --------
Trigger - Add to LF Loop <gen> the event (Time - Every 0.05 seconds of game time)
LF Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to LF_MainAbility
Actions
Set LF_Index = (LF_Index + 1)
Set LF_Caster[LF_Index] = (Triggering unit)
Set LF_OwnerOfCaster[LF_Index] = (Owner of LF_Caster[LF_Index])
Set LF_Level[LF_Index] = (Level of LF_MainAbility for LF_Caster[LF_Index])
Set tempPoint = (Target point of ability being cast)
Set LF_NumberOfStrikes[LF_Index] = 0
Set LF_Interval[LF_Index] = 0.00
Unit - Create 1 LF_FlareType[LF_Level[LF_Index]] for LF_OwnerOfCaster[LF_Index] at tempPoint facing Default building facing degrees
Set LF_Flare[LF_Index] = (Last created unit)
Animation - Play LF_Flare[LF_Index]'s birth animation
Animation - Queue LF_Flare[LF_Index]'s stand animation
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
LF_Index Equal to 1
Then - Actions
Trigger - Turn on LF Loop <gen>
Else - Actions
LF Loop
Events
Conditions
Actions
For each (Integer tempInt) from 1 to LF_Index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(LF_Flare[tempInt] is alive) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
LF_NumberOfStrikes[tempInt] Equal to LF_MaxNumberofStrikes
Then - Actions
Unit - Kill LF_Flare[tempInt]
Set LF_Caster[tempInt] = LF_Caster[LF_Index]
Set LF_Flare[tempInt] = LF_Flare[LF_Index]
Set LF_Interval[tempInt] = LF_Interval[LF_Index]
Set LF_Level[tempInt] = LF_Level[LF_Index]
Set LF_OwnerOfCaster[tempInt] = LF_OwnerOfCaster[LF_Index]
Set LF_NumberOfStrikes[tempInt] = LF_NumberOfStrikes[LF_Index]
Set LF_Caster[LF_Index] = No unit
Set LF_Flare[LF_Index] = No unit
Set LF_Index = (LF_Index - 1)
Set tempInt = (tempInt - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
LF_Index Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
LF_Interval[tempInt] Equal to LF_StrikeTime
Then - Actions
Set tempPoint = (Position of LF_Flare[tempInt])
Set tempGroup = (Units within LF_GroupAoE of tempPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of LF_OwnerOfCaster[tempInt]) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) i
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in tempGroup) Greater than LF_GroupInteger
Then - Actions
Set tempGroup2 = (Random LF_NumberOfRandomUnits units from tempGroup)
Unit Group - Pick every unit in tempGroup2 and do (Actions)
Loop - Actions
Set tempUnit = (Picked unit)
Unit - Create 1 LF_CastingDummy for LF_OwnerOfCaster[tempInt] at tempPoint facing Default building facing degrees
Set tempUnit2 = (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to tempUnit2
Unit - Add LF_DummyAbility to tempUnit2
Unit - Set level of LF_DummyAbility for tempUnit2 to LF_Level[tempInt]
Unit - Order tempUnit2 to Orc Far Seer - Chain Lightning tempUnit
16:27, 20th Sep 2014
TriggerHappy:
I don't understand why you're using a different dummy unit for each level.
For the dummy caster it would probably be best to create one at initialization and reuse it as Dalvengyr said. Doing this at map...
That is indeed better. It saves variable settings, expiration timers, etc.
If your map is really big I suggest using Universal Dummies, where they could have seven dummy abilities to cast. Only add more when the order ids need to recur.
I don't think so, since ordering dummy to cast spell via trigger seems fairly instant (no delay). So, when you move the dummy to another pos right after order, the cast event has been finished. So lightning wont be stretched.
If you can, so why not? Even if you have to add another bunch of code, it's still a right thing to do. Because by using wc3 native abiltities, that doesn't mean no script is running behind, another bunch of code. Chain lightning is one good example.
a channeling dummy spell can't be accommodated by a single dummy
I don't think so, since ordering dummy to cast spell via trigger seems fairly instant (no delay). So, when you move the dummy to another pos right after order, the cast event has been finished. So lightning wont be stretched.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.