• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Help me with Passive chain lightning

Status
Not open for further replies.
Level 4
Joined
Jul 25, 2007
Messages
66
I have been trying to make a passive chain lightning spell, like a 50% chance to cast when ever you attack someone. So far, this is what I have.
halpwp7.png


Sorry for the large picture, wanted to make sure you guys cold read it.

Edit: Never mind that isn't too big
 
This may or may not be able to help you with the concept of dummy-units. Unfortunately, I have absolutely no clue how to make a 50% chance-on-hit type thing... I'm positive it's possible in JASS Script, but I dunno about GUI.

There is also an Edit-Post button near the bottom of your post. This is preferable to double-posting.
 
  • Passive CL
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Passive CL for (Attacking unit)) Greater than 0
      • (Random integer number between 1 and 2) Equal to 1
    • Actions
      • Custom script: local location udg_TempPoint
      • Set TempPoint = (Position of (Attacking unit))
      • Unit - Create 1 dummy for (Owner of (Attacking unit)) at TempPoint facing Default building facing degrees
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Chain Lightning (dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Attacked unit)
      • Custom script: call RemoveLocation(udg_TempPoint)
Not tested but should work.
 
Last edited:
  • Passive CL
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Passive CL for (Attacking unit)) Greater than 0
    • Actions
      • Custom script: local location udg_TempPoint
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
        • Then - Actions
          • Set TempPoint = (Position of (Attacking unit))
          • Unit - Create 1 dummy for (Owner of (Attacking unit)) at TempPoint facing Default building facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add Chain Lightning (dummy) to (Last created unit)
          • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Attacked unit)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
Not tested but should work.
it should work, but the TempPoints local doesnt work, since its a If - All Conditions..... thing, but move the call RemoveLocation to under Order (Last created unit) and it should be flawless :P
 
they go away from If/then/else is i remember correctly

and no, you dont need to move the Set TempPoint above the If/then/else, it should work perfectly anyway, which actually leads us that we dont even need the If/then/else, since we can just use the Random Number in the Conditions.....
 
Status
Not open for further replies.
Back
Top