• 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] Need Help about attaching and detaching attchment

Status
Not open for further replies.
Level 3
Joined
Dec 30, 2008
Messages
47
hey can somebody help i need a trigger cause i have a weapon were it the unit will instantly gain a weapon or attachment this is my problem i got a trigger when the unit use metamorph it change right when it change the trigger remove the weapon but when metamorph cooldown the weapon is not there anymore you must drop the item again and then get it again to gain weapon or attachment again oh yeah my attachment is an ability can someone help me?!
 
Level 3
Joined
Dec 30, 2008
Messages
47
Ummm i have many different kinds of weapons or attachemnt in my map and oh yeah i forgot how can I ummmm its hard to explain heres an example my hero have an short sword with a attachment or a model then i saw a medium sword with new attachment or a model whay trigger i can use i want when the unit pick it up it gonna says you have already a sword sort of like that
 
Level 8
Joined
Sep 13, 2006
Messages
431
I haven't done anything like this in a while, and I didn't have time to test (will later), but this is what I was kinda thinking in terms of actions. There are a couple of small quirks, like that it has the potential to rearrange your items if you have blank slots, but this could be averted if you really wanted...
I think it should work it terms of refreshing your item (and thus attachment) in any case, though...

  • Actions
    • For each (Integer A) from 1 to 6, do (Actions)
      • Loop - Actions
        • Set ItemType = (Item-type of (Item carried by Hero in slot (Integer A)))
        • Hero - Drop the item from slot (Integer A) of Hero
        • Item - Remove (Last dropped item)
        • Hero - Create ItemType and give it to Hero
 
Level 8
Joined
Sep 13, 2006
Messages
431
Simply add the model to the item iteslf, I do believe that such things do not even need triggers. Like the flags and banner items, you simply make the item do the attaching. That way it will always be in effect and no triggers are needed.

If I'm not mistaken, I think he's saying that the attachment granted by the item (as you suggested) disappears after having used metamorphosis.
 
Status
Not open for further replies.
Top