• 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.

Kill last unit if unit of that type is more than 1

Status
Not open for further replies.
Level 10
Joined
May 25, 2021
Messages
376
  • Tree and Rock Creation
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Dimension Portal
    • Actions
      • Destructible - Create a Ashenvale Canopy Tree at (Target point of ability being cast) facing (Random angle) with scale 1.00 and variation 0
      • Unit - Create 1 Stone for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
Hello @Pyrogasm,
My idea is creating only 1 Stone at a time - this Stone is a building. And I would love to have an effect of Nightelf building destruction (the cyan explosion) as this Stone is killed/removed.
What other things should I add to the trigger above?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
You should almost always be using the Event:
  • Unit - A unit Starts the effect of an ability
Begins casting happens before the spell executes and can be interrupted while still firing the trigger.

You can choose the death art inside of the Object Editor under Art - Special. Look at a Night Elf building for an example.
 
Level 10
Joined
May 25, 2021
Messages
376
Before creating the new Stone:
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units owned by (Owner of (Triggering Unit)) of type Stone) and do (Actions)
    • Loop - Actions
      • Unit - Kill (Picked Unit)
This explains the custom script line: Things That Leak
Like this?
 

Attachments

  • Screenshot_30.png
    Screenshot_30.png
    16.4 KB · Views: 6
Status
Not open for further replies.
Top