• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] AoE Trigger wants a target

Status
Not open for further replies.
Level 3
Joined
Nov 19, 2010
Messages
51
[Solved] AoE Trigger wants a target

Hello!
I looked at your different forums and got a bit confused if it was actually here or the other forum I had to post this...I already made a trigger that doesn't work. So I suppose it's here?

It's an AoE spell called Final Resort. Upon use it will reduce the casting units health to 1 and in return kill every single unit on a region called battlefield owned by an opposing player. You do not need to target anything it's just a one-press button that will spread mass destruction.

Back in the day I was pretty good at this stuff but it's been so long so I am rusty. I tried doing it with a dummy method but that seems to just crash the game when you increase the range it affects. The spell is based on Flame Strike that you get from Hero units.

So to cut it down:
It shouldn't ask for a target when used.
It should affect the entire region that I specified without problems.

Here is the trigger:

[TRIGGER=Final Resort]Final Resort
Events
Unit - MyUnit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Final Resort
Actions
Unit - Remove Final Resort from MyUnit
Unit - Set life of (Triggering unit) to 1.00
Unit Group - Pick every unit in (Units in Battlefield <gen> owned by Player 2(Blue)) and do (Actions)
Loop - Actions
Unit - Create 1 Dummy(Red) for (Owner of (Triggering Unit)) at (Position of (Picked unit)) facing (Random point in Battlefield <gen>)
Unit - Add Final Resort to (Last created unit)
Unit - Order (Last created unit) to Neutral - Kaboom! (Picked unit)
Unit -Add a 1.50 second Generic expiration timer to (Last created unit)[/TRIGGER]

Help greatly appreciated! :D
 
Last edited:
Something like this? I modified the spell a bit as well.

[TRIGGER=Final Resort]Final Resort
Events
Unit - MyUnit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Final Resort
Actions
Unit - Remove Final Resort from MyUnit
Unit - Set life of (Triggering unit) to 1.00
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in Battlefield <gen> owned by Player 2(Blue)) and do (Unit - Kill (Picked unit))
Set Point = (Center of Battlefield <gen>)
Special Effect - Create a special effect at Point using Abilities....
Special Effect - Destroy (Last created special effect)[/TRIGGER]

Edit:
Tested it and didn't work.
It still wants you to actually target an area to use the spell whereas it should just fire when you click the spell right away without having to target anything. If I have to use Custom scripts for that I am fine with it.
 
Last edited:
Can anyone try make the spell and do a screenshot?
Like base it off of an already existing spell and then show it to me so I can check I don't do something wrong?

I keep getting the circle that asks me to pick a location for the trigger to happen >_<
 
Like Maker and defskull mentioned, you should have based the ability off an instant cast ability so that you wouldn't see the targetting. In the test-map, I based the ability off of Howl of Terror.

Hopefully the trigger and test-map should be self-explanatory:
  • FinalResort
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Final Resort
    • Actions
      • Unit - Set life of (Triggering unit) to 1.00
      • Unit - Remove Final Resort from (Triggering unit)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in FinalResortRegion <gen> matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True))) and do (Actions)
        • Loop - Actions
          • -------- Deal an absurdly high amount of damage which should kill the unit. --------
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 1000000000.00 damage of attack type Spells and damage type Normal
          • -------- You can play an effect if you want. --------
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
 

Attachments

This does exactly what I wanted it to do!
Thanks a lot. Now that I know this I am sure it will help me in the future with other custom spells ^^
 
See the funny thing is that I based it on another (as I see it) spell that triggers when clicked and doesn't need a targeted area. But I guess it was just THAT spell that didn't work...

I tried with War Stomp and that Hammer Shock spell as well that the mountain king has. Those are both instant spells that doesn't need a target or targeted area as it fires at the foot of the caster x_x
 
Status
Not open for further replies.
Back
Top