How can I give an item the property of giving its owner an attribute when equipped? For example, a piece of armor raising defense, and giving the unit the "Armored" tag?
I've been trying to find an appropriate behavior to implement when equipped but I can't seem to find anything that'll do this.
Yes, the Cost field under the Weapon will let you add charges. Set link to whatever you want ("Weap/YourWeaponIdentifier" for consistency), location to ability, Count (max) to the maximum amount of ammo it can hold, Count (start) to the starting amount of ammo, and Count (use) to how much ammo is consumed every time the weapon is fired.
You can then use a Modify Unit effect, or triggers, to restore charges via powerups or whatever.
Sorry, I'm not sure if I phrased my question correctly.
I'm actually trying to apply the charges to an item that equips a weapon. I want to make an item like "Gauss Rifle" that equips Marine - Gauss Rifle, and has X charges.
Which do I have to apply the cost to, and which do I link it to? I changed the item to 5 max, 5 start, 1 use, Weap/GaussRifle and Ability, but it doesn't allow me to set it to that (it changes it back to Item/GaussRifle whenever I close that window). In game, it doesn't consume charges to attack, instead using charges whenever I click on it.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
How can I give an item the property of giving its owner an attribute when equipped? For example, a piece of armor raising defense, and giving the unit the "Armored" tag?
I've been trying to find an appropriate behavior to implement when equipped but I can't seem to find anything that'll do this.
Simple answer is, you cannot.
Attributes cannot be modified by behaviors.
The workaround is to create another unit and use triggers or some fancy data editor work to swap units when the item is acquired.
@RileyStarcraft: Go
Thanks. Seems kind of odd, but at the same time that explains why I can't find anything. :D
Also, is it possible to add charges / durability to a weapon? Or ammunition?
Yes, the Cost field under the Weapon will let you add charges. Set link to whatever you want ("Weap/YourWeaponIdentifier" for consistency), location to ability, Count (max) to the maximum amount of ammo it can hold, Count (start) to the starting amount of ammo, and Count (use) to how much ammo is consumed every time the weapon is fired.
You can then use a Modify Unit effect, or triggers, to restore charges via powerups or whatever.
@RileyStarcraft: Go
Sorry, I'm not sure if I phrased my question correctly.
I'm actually trying to apply the charges to an item that equips a weapon. I want to make an item like "Gauss Rifle" that equips Marine - Gauss Rifle, and has X charges.
Which do I have to apply the cost to, and which do I link it to? I changed the item to 5 max, 5 start, 1 use, Weap/GaussRifle and Ability, but it doesn't allow me to set it to that (it changes it back to Item/GaussRifle whenever I close that window). In game, it doesn't consume charges to attack, instead using charges whenever I click on it.