• 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] Trigger for destructible queue

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
A unit can only attack 1 target at any given time so it is not possible what you are asking.

You could make an AoE spell damage all destructibles in an area. Iterate through all destructibles around the target point and reduce their life by a certain amount or deal damage to them with the unit damage widget native.

You could try queueing up attack orders so that the unit will kill each destructible one at a time with its normal attack. I am unsure of how to trigger queue orders in WC3, I think it may involve pausing the unit or issuing orders when the unit is in a certain state.
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
You would have to use an Order Queue system which basically allows you to have an event that fires when a unit has no orders left and make a list of orders that it has to do after each other.

I was about to make one, but I didn't really see any need of this apart from triggered AI.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
In StarCraft II it is easy to queue up orders. I wish WC3 had the preset to queue orders when issuing them.

I have seen it done in WC3, and even achieved it myself once long ago. Or at least I think so. I was very new to JASS back then so maybe the trigger I wrote performed order queues by issuing a new order after the previous one completes.
 
Level 7
Joined
Nov 19, 2015
Messages
283
How can i make a trigger wherein an AOE spell will make a unit attack each barricade destructible caught inside the spell???

You could try this

Have an area targeted ability
Set all units in range to a target group indexed by caster
Check they are baricades
Then add to the target group
Add hero to caster group
Order unit to attack random unit in the target group
Create a dummy to cast a dummy buff on hero

When a unit dies
if unit = baricade
Remove the unit from the target group
check if there are still units in the target group
check is units in caster group still have the buff
Order the unit to attack random unit in the group
Clear leaks when buff runs out or no units left in target group.

Unit is issued an order
Unit is in caster group
Unit has buff ____
Removed unit from caster group
Remove specific buff

This should allow the caster to attack until the buff runs out or the all the baricades die. You can also have a check distance instead of random unit so you will attack the nearest baricade first.
 
Status
Not open for further replies.
Top