• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Reworking Monsoon {hitting a random unit in 2000 range of target point}

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2008
Messages
502
Hi,

I'm trying to create an ability with the effect of Monsoon except I'd like to change the way the damage is dealt. See the mechanics of monsoon is it will send a wave of attacks, wait a specified time and another wave. To me this isn't so nice or realistic of a lightning storm and is a little unbalanced.

So my query is how to make an ability that will send a bolt of lightning from the sky every so often to damage a random unit in a range 2000 from point of ability being cast.

I've tried to make a dummy flying unit cast a non bouncing chain lightning but I can't figure out how to work the targeting to make it so the lighting comes from directly above the target.

Any ideas?
 
Level 2
Joined
Jan 29, 2009
Messages
21
  • Events
    • Unit - Caster0000 <gen> Begins Channeling an ability
  • Conditions
    • (Ability being cast) Equal to Monsoon
  • Actions
    • Set loc = (Target Point of Ability Being Cast)
    • Set caster = (Triggering Unit)
    • Trigger - Turn On <Trigger Name>

  • Events
    • Time - Every X seconds of game time
  • Conditions
  • Actions
    • Set group = Units within 2000 of loc Matching <Your conditions here (like is an enemy of owner of triggering unit, etc)>
    • Set target = (Random Unit from (group))
    • <Your effect here>
    • Unit - Cause Caster0000 <gen> to damage (target), dealing Z damage of attack type Spells and damage type Magic
    • Custom script: call DestroyGroup (udg_group)
For <Your effect here>, if you like the monsoon lightning effect, just create a special effect on the randomly picked unit. Otherwise, create 1 of your dummy units at that position and order it to cast your chain lightning ability on the unit. the lightning will appear to come from the sky if you set the height of the dummy high enough.

make sure to destroy the special effect / dummy unit!

oh, i forget to mention that you need another trigger that when the caster stops casting an ability to turn off the periodic event trigger and destroys the location using "Custom script: call RemoveLocation (udg_loc)".

Hope this helps.
 
Level 8
Joined
Nov 9, 2008
Messages
502
Beautiful! Now that's what a lightning storm should look like.
Thanks for the help guys!

Just to note, I had to add action 'remove all units of group from group' because it would target an already dead unit despite destroying the group variable every time. Weird.
 
Level 2
Joined
Jan 29, 2009
Messages
21
Beautiful! Now that's what a lightning storm should look like.
Thanks for the help guys!

Just to note, I had to add action 'remove all units of group from group' because it would target an already dead unit despite destroying the group variable every time. Weird.

Add a "(Matching Unit) is Dead = false" check to your conditions to your "Pick units in range of loc matching <>" call, this way dead units are never in the group to begin with. You should also check for structures (if you dont want them targeted), magic immune, etc.
 
Status
Not open for further replies.
Top