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

[Spell] AoE spell to X units

Status
Not open for further replies.
Level 4
Joined
Aug 28, 2015
Messages
75
He was trying to create a skill that stuns (custom effect "Sunshine) 4 enemies only air 400 unit range, but has never left me ... Someone help me?

I also want to work with Entangle Roots, but it 3 enemies in AoE target
 
Last edited by a moderator:
Level 37
Joined
Jul 22, 2015
Messages
3,485
It would be so ... I want to know how to make a custom spell AoE affects only a certain number of enemies ...

If this is a triggered spell, then all you'd have to do is make a unit group that matches the conditions of what you want. Wietlol has a perfect example of what you should do in this post. If its just an Object Editor spell, then you can obviously just edit the data fields to the spell you're editng xP
 
Level 12
Joined
May 22, 2015
Messages
1,051
Could you be a bit more clear with what you need exactly...? Your post sounds extremely cryptic lol ._.

He basically wants it like casting a single-target spell on units in AOE, but capped at a certain amount. It should work similar to the treant spell. You can target many trees, but there is a max number that turn into treants. If you target fewer trees than max number of treants, you get only the number of trees as treants.

However, the treant spell definitely is not how you want to actually implement this. You need a fake AOE spell that only indicates the AOE of the ability. Channel can do this, I believe, but I usually use Death and Decay. 0 duration, 0 damage, no targets allowed. Then I make the AOE the same as the ability I want it to be used for.

In triggers, there is an automatically generated point called "target point of ability being cast". You can use this to determine where the spell is cast. Use a unit group to select the units in range of that point.

Then you have a couple options. To keep it simple, you can just use the "Random unit from unit group" function to pick a random target. Make a dummy unit to cast the spell you want on it and have it cast it. Be sure to remove this unit from the group as well so it doesn't happen more than once.

Repeat as many times as you like. Then destroy the group and all the points created.

If you have little experience with the editor, this will be really hard lol. Let me know if it makes any sense to your or not.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Emm... In fact, I'm a bit of a newbie to the triggers... I could show me a an example trigger?

Here's an "example" trigger. I'm not entirely sure if I cleared the ER_Group properly since I used the same variable... can someone correct me on that?

  • Set ER_Caster = (Triggering unit)
  • Set ER_Player = (Owner of ER_Caster)
  • Set ER_TargetLoc = (Target point of ability being cast)
  • Set ER_Group1 = (Units within 500.00 of ER_TargetLoc)
  • Set ER_Group2 = (Random 4 units from ER_Group1)
  • Unit Group - Pick every unit in ER_Group2 and do (Actions)
    • Loop - Actions
      • Set ER_PickedUnit = (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ER_PickedUnit belongs to an enemy of ER_Player) Equal to True
          • (ER_PickedUnit is alive) Equal to True
          • (ER_PickedUnit is A structure) Equal to False
        • Then - Actions
          • Set ER_PickedUnitLoc = (Position of ER_PickedUnit)
          • Unit - Create 1 Dummy Unit for ER_Player at ER_PickedUnitLoc facing Default building facing degrees
          • Unit - Order ER_PickedUnit to Night Elf Keeper Of The Grove - Entangling Roots ER_PickedUnit
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation (udg_ER_PickedUnitLoc)
        • Else - Actions
  • Custom script: call DestroyGroup (udg_ER_Group1)
  • Custom script: call DestroyGroup (udg_ER_Group2)
  • Custom script: call RemoveLocation (udg_ER_TargetLoc)
 
Last edited:
Level 4
Joined
Aug 28, 2015
Messages
75
Specifically, I want to create 2 skills: "Rooting mass" (3 enemies causing him rooted X damage per second for X seconds) and "Solar Strike" (Stuns up to 4 enemy air unit in X AoE, for X seconds, causing X damage)
The spell "Solar Strike" should behave like "Lightning Storm", but for 4 enemies around the unit, with the missile changed hammer effect on the ability to "Reveal (Target)" and to effect "Stunned" changed to "Sunshine" with the same model of missile
 
Last edited:
Level 37
Joined
Jul 22, 2015
Messages
3,485
Specifically, I want to create 2 skills: "Rooting mass" (3 enemies causing him rooted X damage per second for X seconds) and "Solar Strike" (Stuns up to 4 enemy air unit in X AoE, for X seconds, causing X damage)
The spell "Solar Strike" should behave like "Lightning Storm", but for 4 enemies around the unit, with the missile changed hammer effect on the ability to "Reveal (Target)" and to effect "Stunned" changed to "Sunshine" with the same model of missile

It would have almost, if not entirely, the same exact structure as the triggers I posted above.
 
Last edited:
Status
Not open for further replies.
Top