• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Volley Spell?

Status
Not open for further replies.
Level 28
Joined
Sep 26, 2009
Messages
2,520
You need to make 2 abilities. One uses your hero, this is just a dummy ability (does nothing but takes that heroe's mana, has cooldown and fires trigger).
The other is the actual single-target ability (e.g. fireball), but is set so it costs no mana, has very high range, has no cooldown.

Now you need to create a dummy unit (has no model, has locust ability so it cannot be targeted and damaged, has 0 movement speed, movement type: fly, has Art - Cast point set to 0 and has "can't raise, does not decay" death type)

Now in trigger - when the dummy ability (the one used by hero) fires this trigger, you pick all suitable targets around the hero into unit group and loop thruogh the group. You create 1dummy, give him the actual ability (the one which has no mana cost, no cooldown) and order him to cast it on each enemy in the group.
If everything is done correctly, the dummy unit will cast fireball on all nearby enemies.


something like this
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Your_hero's_ability
    • Actions
      • Set loc = (Position of (Triggering unit))
      • Unit - Create 1 Your_dummy_unit for (Triggering player) at loc facing Default building facing degrees
      • Set dummy = (Last created unit)
      • Unit - Add Your_actual_ability(e.g.fireball) to dummy
      • Unit Group - Pick every unit in (Units within 512.00 of loc matching *conditions* and do (Actions)
        • Loop - Actions
          • Unit - Order dummy to Neutral - Firebolt (Picked unit) //in case it is the fireball spell, else it will be different order
      • Unit - Remove dummy from the game
      • Set dummy = No unit
      • Custom script: call RemoveLocation(udg_loc)
      • Custom script: set udg_loc = null
This trigger could be further improved by not removing the dummy unit, but having it saved in some variable and then using in the next casts.
 
Triggers & Scripts In this forum you may ask for help on fixing a trigger or script. But if you need help getting started with a trigger, this is not the right place — use the World Editor Help Zone.

You can try to change the target style and that stuff in the OE to see if you can get the desired result.

Your other option is to make your own custom spell. And use effects and trigger the damage.
 

Rheiko

Spell Reviewer
Level 25
Joined
Aug 27, 2013
Messages
4,121
Hello, I'm not sure if this is the right section but..

Let's say for ex: that I wanna make it so that when I activate Firebolt or Frostbolt or Deathcoil, that it would hit all hostile targets around the hero/unit instead of the directed target.

How do I implement that in a trigger?
like.. when you cast fireball, it'll move to its destination and when it makes contact with nearby enemies it'll explode and deals damage to nearby enemies?
let me know if my assumption true
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
hit all hostile targets around the hero/unit instead of the directed target.

Hm... Except if you want a custom damage or to apply some buff Fan of Knives would do exactly that. Just change the projectile art to desired effect and remove the... "covering" art ( the multiple fan of knives which "cover" the actual projectiles to create an effect of "it goes in all directions")
 
Status
Not open for further replies.
Top