UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: Rollonmath42 on October 04, 2012, 03:48:28 am

Title: [User Tutorial] Custom Music in Zombies
Post by: Rollonmath42 on October 04, 2012, 03:48:28 am
This is how to get custom music to play in your map when activating an object.

Function created by SajeOne:
Code Snippet
Plaintext
music_stuff()
{
    trigger_name = GetEnt("message","targetname");
    trigger_name SetHintString("Press &&1 to Listen to Music");
    flag_wait("all_players_connected");
    trigger_name waittill("trigger",player);
    trigger_name delete();
    player playsound("example");
}

Any suggestions as for the next tutorial I should do?
Title: Re: [User Tutorial] Custom Music in Zombies
Post by: treminaor on October 04, 2012, 04:01:36 am
There's a video on my channel about converting sounds, and since then I've simplified it a ton for my personal uses... i should make another video when i have time.
Title: Re: [User Tutorial] Custom Music in Zombies
Post by: Rollonmath42 on October 04, 2012, 11:37:55 am
Oh, well for some reason for me as long as its a .wav file (both 48000 and 44100 as the project rate works) and Audacity opens it, the sound works in game.
Title: Re: [User Tutorial] Custom Music in Zombies
Post by: treminaor on October 04, 2012, 05:03:50 pm
Oh, well for some reason for me as long as its a .wav file (both 48000 and 44100 as the project rate works) and Audacity opens it, the sound works in game.
This isn't always the case.
Title: Re: [User Tutorial] Custom Music in Zombies
Post by: jzob1234 on October 04, 2012, 11:35:17 pm
what is the targetname for the trigger?
Title: Re: [User Tutorial] Custom Music in Zombies
Post by: Rollonmath42 on October 04, 2012, 11:59:26 pm
The targetname is message, though you can change it to what you want... if you know how  :troll: