• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] lightning effect

Status
Not open for further replies.
Level 17
Joined
Nov 12, 2016
Messages
785
hi everyone.


DIS Shock trigger 1
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Hashtable - Create a hashtable
Set Disorienting_Shock = (Last created hashtable)
DIS Shock trigger 2
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Disorienting Shock
Actions
Lightning - Create a Forked Lightning lightning effect from source (Position of (Triggering unit)) to target (Target point of ability being cast)
Lightning - Change color of (Last created lightning effect) to (1.00 0.00 1.00) with 1.00 alpha
Hashtable - Save Handle Of(Casting unit) as 2 of (Key (Target unit of ability being cast)) in Disorienting_Shock
Hashtable - Save Handle Of(Last created lightning effect) as 1 of (Key (Target unit of ability being cast)) in Disorienting_Shock
Hashtable - Save 0.05 as 0 of (Key (Target point of ability being cast)) in Disorienting_Shock
Unit Group - Add (Target unit of ability being cast) to Disorienting_Shock_Group
DIS Shock trigger 3
Events
Time - Every 0.20 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in Disorienting_Shock_Group and do (Actions)
Loop - Actions
Set DisorientingShock_real_time = (Load 0 of (Key (Picked unit)) from Disorienting_Shock)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DisorientingShock_real_time Greater than 0.00
Then - Actions
Lightning - Move (Load 1 of (Key (Picked unit)) in Disorienting_Shock) to source (Position of (Load 2 of (Key (Picked unit)) in Disorienting_Shock)) and target (Position of (Picked unit))
Hashtable - Save (DisorientingShock_real_time - 3.00) as 0 of (Key (Picked unit)) in Disorienting_Shock
Else - Actions
Lightning - Destroy (Load 1 of (Key (Picked unit)) in Disorienting_Shock)
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Disorienting_Shock
Unit Group - Remove (Picked unit) from Disorienting_Shock_Group

is anything wrong with this trigger ???
the lightning dosent fallow the target when cast on it if the target moves the lightning looks like its hitting the ground.
a friend of mine helped me to make this but still it dosent work as it should

plus why do i feel my map loading time just got longer after i made this ?
 
Level 17
Joined
Nov 12, 2016
Messages
785
Trigger1.png
Trigger2.png
Trigger3.png
 
Level 17
Joined
Nov 12, 2016
Messages
785
well here it is


is anything wrong with this trigger ???
the lightning dosent fallow the target when cast on it if the target moves the lightning looks like its hitting the ground.
a friend of mine helped me to make this but still it dosent work as it should

plus why do i feel my map loading time just got longer after i made this ?
 
You save 0.05 as time but reduce it with 3 so the lightning should only be visible for 0.2 to 0.4 seconds.

To make a fluid following you should use an frequenzy of 20 times a second (0.05) or more, most time 32 times a second is suggested (0.03125).

hitting the ground
Your lightning does not have an flying height, which the gui actions do not support. this tutorial explains how to make lightnings with proper z offset:
Beginner's Guide to Lightning Effects
 
Status
Not open for further replies.
Top