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

AoE Selfcast ability {damage enemies}

Status
Not open for further replies.
Level 2
Joined
Jul 12, 2011
Messages
25
Im sort of stuck, I get all the way up to the select unit group part but im unsure of the best way to deal damage to enemy players.
Its a thunderclap type of spell.
 
Last edited:
Level 29
Joined
Mar 10, 2009
Messages
5,016
Try...
  • Event
    • Unit - Starts the effect on ability
  • Conditions
    • Ability being cast equals to Roar //this is just a sample
  • Actions
    • Set temploc = Position of TriggeringUnit
    • Set Group = Units within AOE of temploc matching unit enemy equals true
    • Pick every unit in Group
      • Unit - UnitDamageTarget(triggerunit, pickedunit, DAMAGE AMOUNT, etc...
sorry for a mess, I dont have my WE...
 
Level 2
Joined
Jul 12, 2011
Messages
25
I've tried the unit - damage target picked unit but didnt seem to do anything. that will trigger multiple units?
 
Level 2
Joined
Jul 12, 2011
Messages
25
  • Vanguards Smash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Vanguard's Smash
    • Actions
      • Set VanGrd_Caster = (Triggering unit)
      • Set VanGrd_Temploc = (Position of (Triggering unit))
      • Set VanGrd_Group = (Units within 300.00 of VanGrd_Temploc matching (((Picked unit) belongs to an enemy of Player 11 (Dark Green)) Equal to True))
      • Unit Group - Pick every unit in (Units within 300.00 of VanGrd_Temploc) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (6.00 x (Real((Strength of VanGrd_Caster (Include bonuses))))) damage of attack type Normal and damage type Normal
      • Unit Group - Remove all units from (Last created unit group)
Thats what I've got, not to good at this but whatever lol
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Your triggers leaks location, leaks group and conditions for group creating are wrong.
(Units within 300.00 of VanGrd_Temploc matching (((Picked unit) belongs to an enemy of Player 11 (Dark Green)) Equal to True))
If you see 'matching' (matching condition) you have to use 'Matching unit' reference. Picked unit refers only to actions that 'pick' units.
Man, why you set a group, and use action Pick all units in group - without selecting group you have just created? You don't need to set group anyways, since I see you remove picked units instantly so its only temporary group.

Try this:

  • Vanguards Smash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Vanguard's Smash
    • Actions
      • Set VanGrd_Caster = (Triggering unit)
      • Set VanGrd_Temploc = (Position of (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 300.00 of VanGrd_Temploc matching (((Matching unit) belongs to an enemy of Player 11 (Dark Green)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Cause VanGrD_Caster to damage (Picked unit), dealing (6.00 x (Real((Strength of VanGrd_Caster (Include bonuses))))) damage of attack type Normal and damage type Normal
      • Custom script: call RemoveLocation (udg_VanGrd_Temploc)
 
Status
Not open for further replies.
Top