StarEdit Tutorial - Music Looping

The problem of looping background music tracks effectively plagued me for a long time, mainly because of an "exception" to a rule in Blizzard's help file. =P Well, it turns out that it is actually pretty simple. First, you need a computer/neutral/rescuable player that has no other triggers (or rather no other triggers that contain obstruction actions: wait, transmission, center view). Here are the two triggers, assuming Player 1 is the human player who wants to hear the music and Player 2 is the computer/neutral/rescuable player:

Owners:
- Player 1
Conditions:
- 'Music Playing' is cleared.
Actions:
- Set 'Music Playing '.
- Play 'music.wav'.
- Preserve trigger.

Owners:
- Player 2
Conditions:
- 'Music Playing' is set.
Actions:
- Wait for ##### milliseconds.
- Clear 'Music Playing'.
- Preserve trigger.

music.wav is your music track (in wav format, of course), Music Playing is a switch, and ##### is the length of your music track in milliseconds. These two triggers will nearly flawlessly play the music track every cycle of ##### milliseconds without interfering with your other triggers.

DI
April 18, 1999

Navigation Panel

» General Directory
- News and Updates
- Forum
- Articles
- Podcast
- FAQ
- Legal and Privacy Info
- Staff Roster
- Contact Us
- Affiliates and Links

» Starcraft II Directory
 ° Legacy of the ConFed
  - Galaxy of Fire
 ° The Bunker

» Starcraft Directory
 ° Ascending Projects
  - Armageddon Onslaught
  - Life of a Marine
  - Flame Knives
  - Aeon of the Hawk
  - StarCraft Team Fortress
  - Iskatumesk's Realm
 ° Ascension of Duran
  - Ascension of Duran
  - Dark Purposes
 ° Vision of the Future
  - Vision of the Future
  - Black Dream
  - Prophecy
  - Final Destiny
  - Zeji Conversion
 ° Legacy of the ConFed
  - Past Purposes
  - Dawn of Darkness
  - Fallen Angel
 ° Celestial Stories
  - Fall From Grace
  - E.D.A.S.T.
  - Celestial Irruption
  - The Gallantry
 ° Classics
  - The Fenix
  - CC 2000
  - New Avalon II
  - The Bob Levels
  - War of the Tribes
  - Resurgence
  - Reclamation of Aiur
  - PalinchronConcordance

» WarCraft Directory
 ° Wanderers of Sorceria
 ° Keys of Sealing

» Resource Directory
 ° StarCraft
  - Programs
  - Modding Tutorials
  - StarEdit Tutorials
  - Customs
 ° WarCraft
  - Programs
  - Modding Tutorials
  - WorldEdit Tutorials
  - Customs

Campaign Creations RSS Feed

Campaign Creations Twitter Feed