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

Attachment Problem

Status
Not open for further replies.
Level 5
Joined
Dec 3, 2010
Messages
119
I wanna use a trigger that automatically adds an attachment like a sword to a unit. But when i try that it doesn't equip the sword to the unit. And i also wanna have a trigger which adds the sword to the unit when the unit picks up a certain item, but i can't place the item in the editor. So how can i make the unit have equipped the sword at the start of the game and how can i place the item in the world editor ?
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Create an item and then an ability based on for Item Damage Bonus +1 for example. Edit the ability, set the damage bonus to 0. In Art - target field, set the model path to the model you want to use. In Art - Target Attachment Point 1 add a string write "left" (without quotation) in there. Add another string, write hand in there. Then give the item that ability. When you pick up the item, the effect will appear in the left hand. You can substitute left for right.
 
Level 5
Joined
Dec 3, 2010
Messages
119
I already did, and if i pick up the item it works but not if the unit already has the item, and i can't place the item with the editor, noly ingame when the unit drops it.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
If you want to add an attachment when picking up an item, you don't need a trigger.
Just modify a passive ability, I usually take Item Damage Bonus
Copy/paste the ability and set the stats to this:

Art - Target: model of the attachment
Art - Target Attachment Point 1: weapon (in case you want dual-wields, you can use attach point 1 for hand, left and the 2nd attach point for hand,right).
Data - Attack Bonus: 0
Set the name to something you can remember

Then go to the item that gives this effect when picked up and add the ability to that item.
It should show the model when picked up.

Note: some units do not have the attachment point "weapon", in that case try "hand, left" or "hand,right".


Edit: Argh, too late...

but not if the unit already has the item
So the unit can wield multiple weapons?
That would suck, since you get multiple sword models through eachother and nothing makes sense anymore.
I advise you to let each unit carry only 1 weapon (or dual-wields, for which you can use hand,left and hand,right).
 
Level 5
Joined
Dec 3, 2010
Messages
119
Ok i made a ability and an item, but still one thing works and the other one does not. How can i make both things work so that the unit has the sword equipped at the start of the game and if the unit picks up the item and gets the sword after the start of the game ?
 
Status
Not open for further replies.
Top