- Joined
- Nov 30, 2013
- Messages
- 926
"Play Music during Map Selection/Hosting map"
Submitted on: January 31, 2017
Submitted on: January 31, 2017
Introduction
Hello there! In this tutorial, I'm going to show you how to play any music you wanted to play outside your map.
There's some minor things you need to know before we're getting starting about this.
Requirements:
Getting StartedThere's some minor things you need to know before we're getting starting about this.
Requirements:
- World Editor Extended (1.27b+) or JassNewGenPack (1.27 and below)
- JASS Knowledge
1.) Go to your map's Custom Script Code.
To do this, open your map and go to your map's Custom Script Code. This where we gonna create our codes.
2.) Insert
//! inject
.After that, we're going to insert this out.
The
JASS:
//! inject config
//! endinject
//! inject config
can allow us to modify the 'Config' function within our Map's JASS script. However, using this script inappropriately can break your map. Here's a link which can give more facts about inject.3.) Insert
call PlayMusic(<Audio>)
.And finally we'll add
For this tutorial, I am going to use PH1.mp3. Also make sure that your map's properties is included within the inject or else the map would be unplayable.
call PlayMusic(<String>)
script into the inject!
JASS:
//! inject config
/*
Map's Properties
*/
call PlayMusic("Sound\\Music\\mp3Music\\PH1.mp3")
//! endinject
Result
If you go to your map in the Map Selection, you will hear the music you specified.
I hope that this tutorial helps you a lot!
I hope that this tutorial helps you a lot!
Author's Note
I got this idea from one of the DoTA map which it'll play a music when selecting it.
If you can't follow the tutorial correctly, I attached the demo map for you to see.
If you can't follow the tutorial correctly, I attached the demo map for you to see.
Attachments
Last edited by a moderator: