Make an ability Item Attack Bonus and make the bonus to what you want. Some attachments are hand, left hand, right chest origin head and more i dont know all of them. Just put whatever you want it to be attached to in Target Attachments
Deeper explination of this step by step
If the weapon is obtained by an item
1.) If you already have the item made with the wapon that it gives then, open it in object editor. If you don't get a blank item to use as your base
2.) Go to the abillites - abillities (at the top of the list) and double click it then input what you want on your weapon.(damage bonus, agi bonus, slow posion, frost attack, dispel magic.) and the weapon is done
If the weapon is added to the unit by:
Event - map initalization
Action - create special effect sword on unit Blademaster<gen>
1.) Modify it a bit
Event - General - map initalization
Action - Special effect -create special effect sword on unit Blademaster<gen>
- General - Set variable - Set weapon equal to last created special effect
(Weapon being a variable of type "Special Effect" no array)
- Unit - Add abillity - Add (the abillitys you want) to Blademaster<gen>
2.) Add a remove weapon abillity to the hero(add this action to the trigger created in step 1)
Action - Unit - Add Abillity - Add Abillity to Blademaster<gen>
(an abillity based off imolation that has no mana cost or any spells/effect at all, referanced to as "remove weapon")
3.) Triggering the Abillity(a new trigger
Event - Generic Unit Event - A unit starts the effect of an abillity
Condition - Abillity Comparision - (Abillity being cast) equal to remove weapon
Action - Special effect - Destroy Special Effect - Destroy Weapon.
(weapon = the special effect variable you made in step 1 of this)
- Unit - Remove abillity - Remove (all the abillities you put on the weapon at the end of step 1)
- Unit - Remove abillity - Remove (remove weapon abillity)
4.) create an item referance to this weapon so it can be picked back up
- open object editor
- go under items
- find tome of agillity
- select it and hit CTRL + C, then CTRL + V
- notice there will be a copy of it in the custom items folder, select the copy
- Under Abillities - Abillities, delete the abillity
- Change the Art - Model Used to custom: Objects\InventoryItems\TreasureChest\treasurechest.mdl
- Change the Text -, stuff to the name and stuff of your weapon
5.) add to the trigger in step 3
add:
Action - Item - Create Item - Create (the item you just made) at (target point of abillity being cast)
6.) Regaining the Weapon Trigger(new trigger)
this will make it so when they pick up the item they get the weapon back
Event - Generic Unit Event - A unit obtains an item
Condition - Item Type Comparision - (Item type of (item being manipulated)) equal to (the item made in step 4)
Action - Special effect - create special effect sword on triggering unit
- General - Set variable - Set weapon equal to last created special effect
(Weapon being a variable of type "Special Effect" no array)
- Unit - Add abillity - Add (the abillitys you want) to triggering unit
- Unit - Add abillity - Add the remove weapon abillity from earlier.
(this trigger should look similar to the first)
and your weapon is created with bonuses the good thing about a weapon this way is that it takes up no inventory space and makes the map look more professional.
If the Weapon is added through Art - Target (your model)
1.) Transfer over to an item or use the trigger meathod above.
How to put the Weapon model onto an item
Event - Generic Unit Event - A unit obtains an item
Condition - Item type comarision - (Item type of (item being manipulated)) equal to (a dummy item that abillities can be added to)
Action - Special effect - Create Special effect on unit - Create (the weapon model) at Arm,Left of triggering unit.
and then simply add the abillites to the item in object editor.
Hope this helped