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

AoE Spell Attribute-based

Status
Not open for further replies.
Level 1
Joined
Jun 9, 2015
Messages
5
Hello hello. It was probably asked numerous time before, and i've also tried to look for it, but i still have trouble to re-do the same thing...

I'm trying to do AoE spell that damage ONLY ennemies. So far i've been able to do area damage based on attribute, but it damage allies too. So i'm kinda stuck there.

.. But also, i got another problem : I'm belgian. So the editor is "half french, half english" ( strange, but that the problem. ) Because of that, i can't find some of the trigger/variable that i need.

So i will make a selfish request. And i'm sorry for that :

Can anyone make a "Attribute-based" aoe spell on a map ( the Instant damage type ) and upload the map there? I would be so thankful if someone could do it.

This way, i'll be able to directly spotted which is what.

Sorry to bother you again. Have a nice day. o/
 

EdgeOfChaos

E

EdgeOfChaos

You can:
1: Use an if/then/else branch to check if the picked unit is an enemy
2: Use a filter (when you pick the units to begin with) to filter out all non-enemies.

(edit) or if you're using the "Damage Area" method, do not do that. Instead the method you should use is creating a Unit Group of units within ### range of the target point of the ability being casted and then use the Damage Target action to damage every single picked unit.

Here's a demo using method 2
  • AoE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Test Ability
    • Actions
      • Set TempPoint = (Target point of ability being cast)
      • Set Caster = (Triggering unit)
      • Custom script: set bj_wantDestroyGroup=true
      • Unit Group - Pick every unit in (Units within 350.00 of TempPoint matching (((Matching unit) belongs to an enemy of (Owner of Caster)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Cause Caster to damage (Picked unit), dealing (Real(((Intelligence of Caster (Include bonuses)) x 2))) damage of attack type Chaos and damage type Enhanced
      • Custom script: call RemoveLocation(udg_TempPoint)
Map is uploaded
 

Attachments

  • Spell Demo.w3x
    16.9 KB · Views: 56
Level 11
Joined
Jan 23, 2015
Messages
788
I'd like to help you but my PC is not available right now, but I hope you'll understand this:
  • AttributeSpell
    • Events
      • Unit - A unit Starts with the effect of an ability
    • Conditions
      • (Ability being cast) is equal to SPELL
    • Actions
      • Set AttCaster = (Casting unit)
      • Set AttPoint = (Target point of ability being cast)
      • Set AttGroup = (Units within AttAOE[Level of ability being cast] range of AttPoint) matching ((Matching unit is a Hero) and (Matching unit is an enemy of AttCaster)
      • Unit Group - Pick every unit in AttGroup and do:
        • Loop - Actions
          • Set AttTarget = (Picked unit)
          • Unit - Damage AttTarget for AttCaster with (AttDamage[Level of ability being cast] * Current Agility points of AttTarget)
      • Custom script: call DestroyGroup(udg_AttGroup)
      • Custom script: call DestroyLocation(udg_AttPoint)
Make sure you set AttAOE and AttRange on initialization.
 
Last edited:
Status
Not open for further replies.
Top