• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] How to give a unit a double attack?

Status
Not open for further replies.
Level 10
Joined
Aug 15, 2008
Messages
448
Hello, I'm having some problems with unit attacks. The "subject" is a structure called ADS tower (Automatic Defence System): at the beginning is weaponless, you can upgrad it to 2 twin linked anti-infantry cannons or a double rocket launcher. Once you've upgraded it, you can upgrade it againt to a fully upgraded one with both anti-infantry cannons and rocket launchers. Since I'd like to make the towers to attack with both weapons (and not using them only for specific targets) I'm trying to make the tower attack with both first and second attack. The problem is the seguent: anti-infantry cannons have a range of 1200 and an attack speed of 0.25 while the rocket launcher a range of 1600 and an attack speed of 2.50; I've tried to give the turret a rocket ability and make it shoot it with a trigger that checks if the turret has an enemy mechanical unit within 1600, but it didn't function; I've tried to give the turret two attacks, but it uses only the anti-infantry one... so, what to do now??
 
Level 6
Joined
Dec 28, 2007
Messages
178
every unit can have 2 attack types (see in the object editor) edit the both and at the bottom of the attack section(or combat or i dont know) you can find the targets allowed or something and set it to both(can set to firts second and both or none as far as i know)

for upgrading use the destroyer's ability(so create the upgraded units as well)
 
Level 6
Joined
Dec 28, 2007
Messages
178
then add the modified version of the pheonix fire (that attacks every 'X' seconds a random target in range for 'X' damage) to the unit and also give him a rocket attack or something
that may work :)
 
Status
Not open for further replies.
Top