• 🏆 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!

Another Help here with a Custom Skill!

Status
Not open for further replies.
Level 3
Joined
Sep 1, 2010
Messages
53
SOLVED
Well, this time, the custom skill is like this:
I use an ability that will damage a target enemy unit. Then, a chain lightning will be cast upon nearby enemy units too.
But the problem is that, I don't want the chain lightning to hit the unit attacked with the first effect of the ability, because if the first effect kills, the chain lightning won't be cast! how do I set the chain lightning to be cast upon enemies that are nearby the primary one?
The trigger is like this:

Events
A unit Starts the effect of an ability
Conditions
Ability being cast equal to Electrical Surge
Actions
'I set all the variables here'
Then...
Create 1 Dummy for EL_Owner at EL_Location facing etc...
Add 1.5 expiration time for last created unit
add Electrical Surge Secondary for last created unit
Set level of Electrical_Surge for last created unit to EL_Level
order last created unit to Orc Far Seer - Chain Lightning

well, everything works properly, except for the problem I said...
Someone can give a little hand here?
 
Last edited:
Level 20
Joined
Jul 6, 2009
Messages
1,885
  • Set Loc = (Position of (Target unit of ability being cast))
  • Set TempGroup = (Units within 500.00 of Loc matching (((Matching unit) Not equal to (Target unit of ability being cast)) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
    • (Number of units in TempGroup) Greater than 0
  • Then - Actions
    • Unit - Order No unit to Orc Far Seer - Chain Lightning (Random unit from TempGroup)
  • Else - Actions
    • Unit - Order Dummy to Orc Far Seer - Chain Lightning (Target unit of ability being cast)
  • Custom script: call DestroyGroup(udg_TempGroup)
  • Custom script: call RemoveLocation(udg_Loc)
 
Status
Not open for further replies.
Top