• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] Triple Lightning

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,601
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,601
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: 40
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