These filters determine the criteria for the unit to automatically seek out a nearby enemy unit (one the is within the scanning range) and attack them with this weapon. The next property that you should be aware of is the Weapon - Scan Filters property. Only Fire While Attacking : Forces the weapon to be used only when the unit is attacking a target (ie the weapon cannot be used while the unit is doing something else, like moving). Only Fire At Target: Forces the weapon to attack the unit's current target. Linked Cooldown: If your unit has multiple copies of the same weapon, then this option forces all the weapons to use the same cooldown. The other important options to be aware of are:Ĭan Initiate Attack: Allows the unit to start attacking a target with this weapon for offensives purposes. There should be several options here already checked, so we only need to check the "Melee" property since we are creating a melee weapon.
![starcraft 2 editor tutorials starcraft 2 editor tutorials](https://cdn105.picsart.com/205676354000201.jpg)
Next go to the weapon property and open it up. Go to the UI - Tooltip property and I'm going to set it to " A might punch". Now we need to set the tooltip displayed when you hover over the weapon in the command bar. I'm going to set mine to " Assets\Textures\btn-research-zerg-cellularreactor.dds". This is the icon that is displayed in the command bar. Set it to your damage effect created previously (if it has not been automatically set). This is the the damage effect that the weapon uses to display the amount of damage in the UI. The next property to look at is UI - Damage Display Effect. This is a measure of how far the target can move away after the weapon has started firing before the target is lost. Now go to the Stats - Range Slop property. Since we are creating a melee weapon, we should use a small number. This is a measure of how far away the target is allowed to be from the unit. Next we need to set the Stats - Range property. This is how fast the weapon is used (how long it takes between using the weapon and being able to use it again). Next we need to set the Stats - Period property. This is the effect that occurs when your weapon is used, so set it to the damage effect you just created (if it hasn't been automatically added). The most important one is the Effect - Effect property. There are few properties here that need to be explained, not all of which we need to modify for this example. Open up the Weapon data type and create your new weapon as follows: In most cases you will just need to create a Legacy weapon which is what I am going to do.
![starcraft 2 editor tutorials starcraft 2 editor tutorials](https://i.ytimg.com/vi/BvawaJ1I_7Q/maxresdefault.jpg)
Strafe: Weapons which force the unit to continually move while firing (eg Protoss Carrier Interceptor) Legacy: Standard weapon type for most units There are three basic types of weapons which are explain below: I just want it to play the normal death animation so I'm going to leave it as Normal. This is used in cases where if a unit dies by this weapon, then a special death animation can be played (for example being burned to death). The other property that is worth mentioning is the Effect - Death property.
![starcraft 2 editor tutorials starcraft 2 editor tutorials](http://graphics.stanford.edu/~danielh//sc1to2tutorial/001-ModulesImport.png)
This property won't have any affect on your weapon, but it does make using the data editor easier if everything has self explaining labels. Finally I'm going to set the Editor - Editor Suffix property to " (Damage)". We are creating a Melee weapon, so I'm going to set it to Melee. For the most part it won' thave any affect on your weapon, but it will affect other abilities which rely on damage types. This property determines the type of damage. Now scroll down to the Effect - Kind property. This property determines how much damage your weapon is reduced by per 1 armor. Now go the the Armor - Armor Reduction property and set it to 1. Go to the Combat - Amount property and set it to 10. First we need to set the amount of damage this weapons deals. Now we need to set a few values on the Damage effect we have just created. Navigate your way over to the effects tab and create a new effect as follows: Now the first step is to create the Damage Effect.