Playing a Sound When a Unit Walks

From Staredit Network Wiki
Revision as of 16:02, 22 November 2012 by DevliN (Talk | contribs) (Created page with 'In a map where the player only controls one unit, playing footstep sounds when that unit walks can make a nice aesthetic touch. This can be done by detecting when a unit moves an…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In a map where the player only controls one unit, playing footstep sounds when that unit walks can make a nice aesthetic touch. This can be done by detecting when a unit moves and playing a sound. To detect when a unit moves you will need to use a location. Generally you will want this location to be small so it can detect movement more accurately.

As an example, we will have a Marine and a location named 'Footsteps'. Consider the following trigger:

StarCraft Trigger [template]
Players:
  • All Players
Conditions:
  • Current Player brings exactly 0 Marine to 'Footsteps'.
Actions:
  • Preserve trigger.
  • Play 'Footstep sound'.
  • Center location labeled 'Footsteps' on Marine owned by Current Player at 'Anywhere'.

The basic form of this system is very simple. You can add complexity by using different footstep sounds for different areas of your map (such as metal in one area and dirt in another). You can also introduce randomization to make it sound more dynamic.

For this to work well, you'll also want to use Hyper Triggers.

Brontobyte's Unit Sounds map demonstrates this method.