Weapons

From HIVE
Revision as of 06:16, 21 November 2010 by DevliN (talk | contribs) (1 revision: StarEdit.net Wiki)
Jump to navigation Jump to search

Weapons

How they work

A unit must have a weapon if it wants to have an attack. Every unit in Starcraft 2 (with exceptions: Overlord... Infestor... High Templar... etc) has a weapon, and therefore an attack.

The weapon is linked to Effects. These effects dictate how the weapon works.

What effects can a weapon have?

Most commonly, all weapons have a Damage effect. Some weapons have a Launch Missile effect. This missile links to the Damage Effect that it causes on impact. Another interesting thing to note is, if you want your unit to have multiple attacks, it will need a Create Persistent effect. This effect links to the Launch Missile which it will create (persistently, or 'multiple times'). The final effect I am going to cover is a Set. A Set is basically a fancy way of making a group of effects.

Simple enough? Hell no! There is a lot more that needs to be covered.

Examples

  • Marine - Gauss Rifle has a Damage Effect which does 6 damage.
  • Phase Cannon - Photon Cannon has both a Launch Missile and a Damage effect.
  • Missile Turret - Longbolt Missile has this Create Persistent, which causes the Launch Missile effect to be triggered twice.
  • Marauder - Punisher Grenade. The weapon Launches Missiles (the projectile), and on impact, the Set is triggered. The Set contains an Apply Behaviour effect and a Damage effect. When we upgrade our Marauders - Concussive Shells, the Apply Behaviour effect (contained within the Set) is activated. Thus slowing all targets hit by the Marauders attack.

Movers

Every Launch Missile effect requires a Mover field. The Mover contains a lot of information about how the Projectile works. You can edit the speed at which it travels, the rate at which it accelerates.

Actions and Actors

A weapon won't make sounds unless you have properly linked a Combat Action (and it's associated Sounds) to trigger when the Weapon is used.