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

an easy questiuon about detecting an attack

Status
Not open for further replies.
Level 24
Joined
Jun 26, 2006
Messages
3,406
maybe give the trebuchets an acquisition range of 200 and a minimum range of 300? er if u can have minimum range. that way they won't attack automatically, problem solved.
 
Level 11
Joined
Feb 22, 2006
Messages
752
If the trebuchets on your map are placed by way of the object palette (eg. players cant build them and triggers don't spawn them after map initialization), you can create a trigger with the event: Unit - Specific Unit acquires a target. The only problem is, if you have a lot of trebuchets, you have to make a separate event for each of them, which would require a lot of copying and pasting :?
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
maybe give the trebuchets an acquisition range of 200 and a minimum range of 300? er if u can have minimum range. that way they won't attack automatically, problem solved.

i alrdy tried that once, just giving them a acuisitionrange of 0, but then the real range of the trebuchet went from 10000 to 1600.. so that didnt work

If the trebuchets on your map are placed by way of the object palette (eg. players cant build them and triggers don't spawn them after map initialization), you can create a trigger with the event: Unit - Specific Unit acquires a target. The only problem is, if you have a lot of trebuchets, you have to make a separate event for each of them, which would require a lot of copying and pasting

yea i know, but the problem is they r being created by triggers :(
 
Level 11
Joined
Feb 22, 2006
Messages
752
Depending on why you want to detect the attack you could just make a trigger like this:

Events

Unit - A unit is attacked

Conditions

Unit-type of Attacking unit Equal to Trebuchet

Actions

*Whatever you want*

I don't know if this will be compatible with what you're doing. If it's not, post what you want your trigger to do after it has detected the attack and I might be able to offer more help.
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
i dint have a trigger. well i order peons to build the trebuchets i a little cinematic, but after that they just attack by emselves. but actually ur trigger might work.. i always thought they attacked a point, but if they fire from themselves, they attack a unit and not the point under the unit right?
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
er in the thread where he mentioned his trebuchets he said he didn't want them attacking on their own, you had to manually give the attack order. will that affect the range under those circumstances?
 
Status
Not open for further replies.
Top