Difference between revisions of "Playing a Sound When a Unit Walks"

From Staredit Network Wiki
Jump to: navigation, search
(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…')
 
m (1 revision imported: Restoring SC1 backup)
 
(No difference)

Latest revision as of 00:35, 21 March 2015

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.