UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Sound easter egg !

HOT
broken avatar :(
Created 8 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
7,989 views
broken avatar :(
  • M0ul3_G4m3r
  • Deleted Member
×
broken avatar :(
M0ul3_G4m3r
This user is deleted :(
Hello community !  :D
I want a script to when we shoot 2 or 3 trigger it's play sound !
Thanks !  :alone:
Marked as best answer by Deleted User 8 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 17 February 2014
Last active: 1 year ago
Posts
69
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
What is broken can be reforged
Signature
Completed maps:
Kingdom Hearts - World at War Link
Minecraft - Black ops 3 Link

WIP:
~

×
shinged's Groups
shinged's Contact & Social LinksShingedvinny545TheShingedMatarra_
Paste this at the bottom of your mapname gsc.
Code Snippet
Plaintext
/*
SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~
SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~
*/
function soundEasterEggInit()
{
level.soundEasterEgg = 0;
level.playEasterEgg = 3;
level.playSoundLocation = GetEnt("easter_egg_sound_location", "targetname"); // Create a script origin and set it to server, not client, then give it this targetname

thread shoot1();
thread shoot2();
thread shoot3();
}

function shoot1()
{
shoot_trig1 = GetEnt("egg_shoot1", "targetname");
shoot_trig1 waittill("trigger", player);
shoot_model1 = GetEnt("shoot_model1", "targetname");
shoot_model1 delete();
level.soundEasterEgg++;
thread finishedEasterEgg();
shoot_trig1 delete();
}

function shoot2()
{
shoot_trig2 = GetEnt("egg_shoot2", "targetname");
shoot_trig2 waittill("trigger", player);
shoot_model2 = GetEnt("shoot_model2", "targetname");
shoot_model2 delete();
level.soundEasterEgg++;
thread finishedEasterEgg();
shoot_trig2 delete();
}

function shoot3()
{
shoot_trig3 = GetEnt("egg_shoot3", "targetname");
shoot_trig3 waittill("trigger", player);
shoot_model3 = GetEnt("shoot_model3", "targetname");
shoot_model3 delete();
level.soundEasterEgg++;
thread finishedEasterEgg();
shoot_trig3 delete();
}

function finishedEasterEgg()
{
if(level.soundEasterEgg >= level.playEasterEgg)
{
IPrintLnBold("You have found all the triggers");
level.playSoundLocation PlaySound("sephiroth"); // Change "sephiroth" to the name of your soundalias.
}
}

Paste this in the main function of your mapname gsc
Code Snippet
Plaintext
thread soundEasterEggInit();

Now in radiant make 3 damage triggers, and put 3 script models in them (Models are optional).
Give the damage triggers the targetname "egg_shoot1" going from 1 to 3.
Give the models the targetname "shoot_model1" going from 1 to 3.

Now make a script origin and set it to server. Give it this kvp ("easter_egg_sound_location", "targetname").
broken avatar :(
  • M0ul3_G4m3r
  • Deleted Member
×
broken avatar :(
M0ul3_G4m3r
This user is deleted :(
Wow thanks !  ;)

Edit: The trigger goes out and the text appears but no music  :'(
Last Edit: October 18, 2016, 04:45:07 pm by HitmanVere
broken avatar :(
  • M0ul3_G4m3r
  • Deleted Member
×
broken avatar :(
M0ul3_G4m3r
This user is deleted :(
Problem fixed  and solves !  :troll:
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 March 2015
Last active: 6 years ago
Posts
9
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
InebriatedGaming's Contact & Social LinksInebriatedGaming
What kind of file should it be? Mp3? Also what folder does it need to be located in?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 23 February 2014
Last active: 5 years ago
Posts
143
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
-Mega \m/
Signature
Trve Kvlt Black Metal
×
Megadeth9811's Groups
Megadeth9811's Contact & Social LinksMegadeth9811Megadeth9811Megadeth9811
 :-[
What kind of file should it be? Mp3? Also what folder does it need to be located in?

Black Ops 3 uses compressed 48000 .wav 16-Bit PCM.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 March 2015
Last active: 6 years ago
Posts
9
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
InebriatedGaming's Contact & Social LinksInebriatedGaming
Do i have to use a seperate program to convert a song to that , and if so would you recommend one? Will it pull that file from my desktop or whatever as long as its included in that one line at the end of the script? Or do i have to put the file in one of the folders thats being called upon at the top of the script?  Sorry i have no idea how any of this works.
broken avatar :(
  • M0ul3_G4m3r
  • Deleted Member
×
broken avatar :(
M0ul3_G4m3r
This user is deleted :(
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 16 August 2016
Last active: 6 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Personal Quote
I like what I do
Signature
I like what I do
×
WoahDude's Groups
WoahDude's Contact & Social Links
I did everything and it won't play the sound for some reason.
Code Snippet
Plaintext
/*
SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~
SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~ SOUND EASTER EGG ~
*/
function soundEasterEggInit()
{
level.soundEasterEgg = 0;
level.playEasterEgg = 3;
level.playSoundLocation = GetEnt("easter_egg_sound_location", "heyman"); // Create a script origin and set it to server, not client, then give it this targetname

thread shoot1();
thread shoot2();
thread shoot3();
}

function shoot1()
{
shoot_trig1 = GetEnt("egg_shoot1", "targetname");
shoot_trig1 waittill("trigger", player);
shoot_model1 = GetEnt("shoot_model1", "targetname");
shoot_model1 delete();
level.soundEasterEgg++;
thread finishedEasterEgg();
shoot_trig1 delete();
}

function shoot2()
{
shoot_trig2 = GetEnt("egg_shoot2", "targetname");
shoot_trig2 waittill("trigger", player);
shoot_model2 = GetEnt("shoot_model2", "targetname");
shoot_model2 delete();
level.soundEasterEgg++;
thread finishedEasterEgg();
shoot_trig2 delete();
}

function shoot3()
{
shoot_trig3 = GetEnt("egg_shoot3", "targetname");
shoot_trig3 waittill("trigger", player);
shoot_model3 = GetEnt("shoot_model3", "targetname");
shoot_model3 delete();
level.soundEasterEgg++;
thread finishedEasterEgg();
shoot_trig3 delete();
}

function finishedEasterEgg()
{
if(level.soundEasterEgg >= level.playEasterEgg)
{
IPrintLnBold("Elena Siegman - Dead Again");
level.playSoundLocation PlaySound("test_sound"); // Change "sephiroth" to the name of your soundalias.
}
}
and for the script origin I added the KVP exactly, but it just shows the text after I shoot all the triggers. I know it isn't the sound because I get no errors and made sure everything was perfect.
broken avatar :(
  • M0ul3_G4m3r
  • Deleted Member
×
broken avatar :(
M0ul3_G4m3r
This user is deleted :(
Do you have add sond aliases ?  :o
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 1 July 2016
Last active: 4 years ago
Posts
6
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Artleck's Groups
Artleck's Contact & Social Links
I've tried this out, I am getting the same issue as WoahDude, I even have it done in my user_aliases.

I originally didn't have test_sound due to me using someone else's user_aliases to help with sound locations. But this is what i put in it.

Spoiler: click to open...
# MUSIC_EE,,,,,,,,,,,,,,,,,,,,
# music,,,music\sabaton\rorkes_drift.wav,,,UIN_MOD,,,,,BUS_MUSIC,,,,,,100,100,,,,,,,,2,oldest,,,1,1,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 16 August 2016
Last active: 6 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Personal Quote
I like what I do
×
WoahDude's Groups
WoahDude's Contact & Social Links
Yes, and it is the correct format
broken avatar :(
  • M0ul3_G4m3r
  • Deleted Member
×
broken avatar :(
M0ul3_G4m3r
This user is deleted :(
I've tried this out, I am getting the same issue as WoahDude, I even have it done in my user_aliases.

I originally didn't have test_sound due to me using someone else's user_aliases to help with sound locations. But this is what i put in it.

Spoiler: click to open...
# MUSIC_EE,,,,,,,,,,,,,,,,,,,,
# music,,,music\sabaton\rorkes_drift.wav,,,UIN_MOD,,,,,BUS_MUSIC,,,,,,100,100,,,,,,,,2,oldest,,,1,1,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

My aliases is this : (the sound must be in sound_assets)  ;)
Spoiler: click to open...
Code Snippet
Plaintext
musica,,,custom\musica.wav,,,UIN_MOD,,,,,,,,,,,90,90,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

And the script_origin :  ;)
Spoiler: click to open...
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 17 February 2014
Last active: 1 year ago
Posts
69
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
What is broken can be reforged
×
shinged's Groups
shinged's Contact & Social LinksShingedvinny545TheShingedMatarra_
I've tried this out, I am getting the same issue as WoahDude, I even have it done in my user_aliases.

I originally didn't have test_sound due to me using someone else's user_aliases to help with sound locations. But this is what i put in it.

Spoiler: click to open...
# MUSIC_EE,,,,,,,,,,,,,,,,,,,,
# music,,,music\sabaton\rorkes_drift.wav,,,UIN_MOD,,,,,BUS_MUSIC,,,,,,100,100,,,,,,,,2,oldest,,,1,1,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Try deleting the script origin and putting in a script model and giving it the same kvp
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 1 July 2016
Last active: 4 years ago
Posts
6
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Artleck's Groups
Artleck's Contact & Social Links
My aliases is this : (the sound must be in sound_assets)  ;)
Spoiler: click to open...
Code Snippet
Plaintext
musica,,,custom\musica.wav,,,UIN_MOD,,,,,,,,,,,90,90,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

And the script_origin :  ;)
Spoiler: click to open...

Tried this and also replacing the origin one with model struct, Still nothing is playing, it's all working such as collecting all perk bottles and then nothing will play. it's strange.

 
Loading ...