• 🏆 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!

can i enable a unit's attack with triggers or ability?

Status
Not open for further replies.
Level 22
Joined
Feb 4, 2005
Messages
3,971
I wanna leave a hero with Attacks Enabled - None from the object editor, so that the only attack comes from if he has an item or ability that enables it. So is there a trigger or ability that can enable his Attack 1 having NONE from the unit data's attacks? I tried Orbs ability that enables attack but only the icon Attack shows, he doesn't really gain his attack 1 with the damage I set to him. I could use a JASS trigger as well if it can enable it.
 
Level 5
Joined
Apr 22, 2008
Messages
139
create an upgrade that enables the attack you want, then use Player - Set Current Research Level to get that upgrade. this wont work for an item tho, because theres no way to unlearn the upgrade for when the item is dropped.
EDIT: i suppose you could just make the item undroppable
or, if you dont mind an active ability, modify the Tinkers Robo Goblin ability to turn the hero into an exact copy of the hero, but with an attack. for an item, when the unit picks up the item, give the unit the Robo Goblin-based ability. when it drops the item, use this trigger:
itemdrop
Events
Unit - A unit Loses an item
Conditions
Or - Any (Conditions) are true
Conditions
(Item-type of (Item being manipulated)) Equal to Tome of Experience
Actions
Unit - Order (Hero manipulating item) to Neutral Tinker - Deactivate Robo-Goblin
Unit - Remove Robo-Goblin from (Hero manipulating item)
 
Last edited:
Level 22
Joined
Feb 4, 2005
Messages
3,971
Yeah, I thought so. There is no way to make the enable/disable thing so I also thought of using e.g Metamorphosis and just creating a hero that is the same but with enabled attack. And yes, it's done with an item.

Weird - when the Meta is on an item the hero transforms to Alternative Form Unit but I cannot transform back to original hero when I click on the item again. Yet, if I drop the item, he instantly becomes the original hero ^^ That works for me, so thx for the suggestion.
 
Status
Not open for further replies.
Top