• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Spell] Triple Lightning

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,614
Hello.

I'm not sure how to do this.

Casts a powerful thunder from the sky that damages and stuns the target for 2 seconds. The lightning also spreads to 2 nearby enemies with half effect.

I don't know how to pick 2 random units within 300 range but the targets aren't the same.

Can you help? Rep for the helper.
 
Level 9
Joined
Dec 26, 2010
Messages
475
something like this? :D
  • Unit Group - Pick every unit in CrocGroup[0] and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Picked unit) is in CrocGroup[1]) Equal to False
        • Then - Actions
          • Unit - Cause Croc[0] to damage (Picked unit), dealing CrocReal[0] damage of attack type Normal and damage type Normal
          • Unit Group - Add (Picked unit) to CrocGroup[1]
        • Else - Actions
  • Custom script: call DestroyGroup (udg_CrocGroup[0])
 
Level 37
Joined
Aug 14, 2006
Messages
7,614
Hey.

I'm a bit late I had a lan party and now I've finally returned from my epic journey.

So... I made a test map where I tried to do this. I didn't succeed so can someone here help me a little bit and make it to work. Thanks.

This is just a template so I just need these things: when player clicks a unit the unit plus two random other units are damaged. Of course if there are less units less will be effected. I don't want that same unit to be damaged multiple times.
 

Attachments

  • TRIPLE LIGHTNING.w3x
    20.4 KB · Views: 45
Level 7
Joined
Apr 1, 2010
Messages
289
you could do this
local lighting udg_SomeLightning1
local lighting udg_SomeLightning2
set a unit group
set a random unit from said unit group
remove random unit from unit group
set another random unit
{
use custom script to create the lightning(so you can set z Height)
save the lightning
} do this twice
destroy the unit group
wait 2 seconds
then destroy the created lightning effects
 
Status
Not open for further replies.
Top