I was looking through the data editor the other day, and found that you can change the number of charges a regular unit's attack has, such as the ghost weapon. Today I tried setting the maximum to 20, initial to 20, and used per attack to 1. Seemed like it'd work, but when I tested it, it didn't display charges, and it could fire more than the set number of 20 shots. Is there something i have to do to make the unit actually use the number of charges?
None.
I'm going to assume you set this in the Cost field of the weapon. Did you set the Link field? That needs to be set to something (whatever you want).
Now I can't seem to find a way to get it to display charges for this (You may need to create a dummy behaviour/ability that uses the same charges but does nothing). Also when a unit runs out of charges it will still target a unit and look like it is going to attack but then does not.
None.
I didn't understand the link field since adding it just opened up a text box for me to enter something in.
I was thinking the same thing for displaying charges, but i think i know a better way to make the unit be out of ammo; disable it's weapon once it has nothing. I don't know if theres a trigger condition for when hes out of charges or something, but it would be better for it to just act as if they had no weapon at all once they're out of ammo.
None.
Bump. I have not been able to create a decent-looking / well-working ammunition system for Starcraft 2 yet...
I made a pretty bitchin' one for Warcraft 3 back in the day, using Item Charges to display the number of shots available in the weapon, and again, item charges, to display the number of clips/magazines available. Reloading would cause the unit to not attack and subtract 1 charge from the Ammunition item, and set the charges in the Weapon to 30 or whatever it was.
I'll look into making something as useful as that for SC2
None.
Bump. I have not been able to create a decent-looking / well-working ammunition system for Starcraft 2 yet...
I made a pretty bitchin' one for Warcraft 3 back in the day, using Item Charges to display the number of shots available in the weapon, and again, item charges, to display the number of clips/magazines available. Reloading would cause the unit to not attack and subtract 1 charge from the Ammunition item, and set the charges in the Weapon to 30 or whatever it was.
I'll look into making something as useful as that for SC2
You might want to contact Artanis, he's working on a Wiki about Inventory/Items systems atm.
None.