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

setmusicstate help

broken avatar :(
Created 12 years ago
by KDXDARK
0 Members and 1 Guest are viewing this topic.
5,286 views
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 4 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
okey so yesterday i was testing some script what i take from Der riese, and now i want to change the song of the meteor but when i change the name it dont work.

Code Snippet
Plaintext
play_music_easter_egg()
{
if (!IsDefined (level.eggs))
{
level.eggs = 0;
}

level.eggs = 1;
setmusicstate("eggs2");

//player thread create_and_play_dialog( plr, "vox_audio_secret", .25);

wait(270);
setmusicstate("WAVE_1");
level.eggs = 0;
}

also it dont plat the meteor_affirm sound
Code Snippet
Plaintext
meteor_egg( trigger_name )
{
while(1)
{

if(!IsDefined (level.meteor_counter))
{
level.meteor_counter = 0;
}

meteor_trig = getent ( trigger_name, "targetname");

if( !isdefined( meteor_trig ) )
{
return;
}
meteor_trig UseTriggerRequireLookAt();
meteor_trig SetCursorHint( "HINT_NOICON" );

meteor_trig waittill( "trigger", player );
player playsound( "meteor_affirm" );

level.meteor_counter = level.meteor_counter + 1;
return;
}
}

somebody can help me? (i have the sounds included in a .csv)
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 3 years ago
Posts
5,544
Respect
6,646Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Signature
If Java had true garbage collection, most programs would delete themselves upon execution.
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
SetMusicState does not play soundaliases, it sends notifies. If you want to play a different sound, just remove the setMusicState line and play the sound from an entity like you normally would.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 4 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
SetMusicState does not play soundaliases, it sends notifies. If you want to play a different sound, just remove the setMusicState line and play the sound from an entity like you normally would.
something like this:
Code Snippet
Plaintext
self playsound( "eggs2" );
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 3 years ago
Posts
5,544
Respect
6,646Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
something like this:
Code Snippet
Plaintext
self playsound( "eggs2" );
Yes, or
Code Snippet
Plaintext
playsoundatposition("eggs2", self.origin);
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 4 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
Yes, or
Code Snippet
Plaintext
playsoundfromposition("eggs2", self.origin);
it give me error on that line :(
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 3 years ago
Posts
5,544
Respect
6,646Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
it give me error on that line :(
Whoops, it's playsoundatposition, not from :D
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 4 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
Whoops, it's playsoundatposition, not from :D
dont work :( it dont play the song
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 6 August 2012
Last active: 6 years ago
Posts
277
Respect
Forum Rank
Mr. Elemental
Primary Group
Scripter Elite
My Groups
More
×
YaPh1l's Groups
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
YaPh1l's Contact & Social Links
If your sound is 2D (which it should be if it's music), you don't need any specific origin from any entity.
Code Snippet
Plaintext
PlaySoundAtPosition("eggs2", (0, 0, 0));
Also make sure that you don't have a typo in the sound alias name.

- Phil.
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 3 years ago
Posts
5,544
Respect
6,646Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
dont work :( it dont play the song
Make sure self is actually an entity with an origin. If it's not a 3D sound, take Phil's advice and use the center of the level as the second parameter.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 4 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
this is the soundalias

Code Snippet
Plaintext
name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,dist_reverb_max,limit_count,limit_type,entity_limit_count,entity_limit_type,bus,priority,spatialized,type,probability,loop,masterslave,loadspec,reverb_falloff_curve,subtitle,compression,randomize_type,secondaryaliasname,chainaliasname,volumefalloffcurve,probability,startdelay,speakermap,reverb,lfe percentage,center percentage,platform,envelop_min,envelop_max,envelop percentage,occlusion_level,move_type,move_time,real_delay,distance_lpf,min_priority,max_priority,min_priority_threshold,max_priority_threshold,doppler

# Easter Eggs,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

sam_fly_laugh,,voiceovers\zombie\sam\sam_fly_laugh.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,1000,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
sam_fly_act_0,,voiceovers\zombie\sam\flytrap_activate_00.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
sam_fly_act_1,,voiceovers\zombie\sam\flytrap_activate_01.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
sam_fly_first,,voiceovers\zombie\sam\flytrap_first_00.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
sam_fly_second,,voiceovers\zombie\sam\flytrap_second_00.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
sam_fly_last,,voiceovers\zombie\sam\flytrap_last_00.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
sam_nospawn,1,voiceovers\zombie\sam\tele_nospawn_00.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
sam_nospawn,2,voiceovers\zombie\sam\tele_nospawn_01.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
sam_nospawn,3,voiceovers\zombie\sam\tele_nospawn_02.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
sam_furnace_2,,voiceovers\zombie\sam\monkey_furnace_00.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
sam_furnace_1,,voiceovers\zombie\sam\monkey_furnace_01.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,,wpn_all,,,,,,,,,,,,,40,60,0.25,1,
flytrap_loop,,SFX\Levels\zombie\maps\giant\flytrap\flytrap_loop.wav,0.6,0.6,0.98,1.08,50,2000,,,,,,ambience,,3d,,,looping,,,curve4,,,pitch,,,curve3,,,,0.6,,,,,,,0.2,,,,,40,60,0.25,1,yes
shoot_off,,SFX\Levels\zombie\maps\giant\flytrap\shoot_##,0.8,0.8,0.98,1.04,1650,1800,,4,priority,,,full_vol,,3d,,,,,,curve4,,,pitch,,,curve3,,,,0.6,,,,,,,0.2,,,,,40,60,0.25,1,yes
flytrap_creeper,,SFX\Levels\zombie\maps\giant\flytrap\flytrap_creeper.wav,1,1,1,1,1500,2000,,,,,,ambience,,3d,,,,,,curve3,,,,,,curve3,,,,0.6,,,,,,,0,,,,,20,40,0.25,1,
flytrap_spin,,SFX\Levels\zombie\maps\giant\flytrap\flytrap_spin.wav,0.8,0.8,1,1,1400,1600,,1,reject,,,full_vol,,3d,,,,,,curve3,,,,,,curve3,,,,0.6,,,,,,,0,,,,,20,40,0.25,1,
flytrap_hit,,SFX\Levels\zombie\maps\giant\flytrap\flytrap_hit.wav,1,1,1,1,1600,1800,,,,,,full_vol,,3d,,,,,,curve2,,,,flytrap_hit_l,,curve3,,,,0.6,,,,,,,0.2,,,,,20,40,0.25,1,
flytrap_hit_l,,SFX\Levels\zombie\maps\giant\flytrap\flytrap_hit_l.wav,0.8,0.8,1,1,500,2000,,,,,,full_vol,,3d,,,,,,curve3,,,,flytrap_hit_r,,curve2,,,,0.6,,,,,,,,left_player,2,,,20,40,0.25,1,
flytrap_hit_r,,SFX\Levels\zombie\maps\giant\flytrap\flytrap_hit_r.wav,0.8,0.8,1,1,500,2000,,,,,,full_vol,,3d,,,,,,curve3,,,,,,curve2,,,,0.6,,,,,,,,right_player,2,,,20,40,0.25,1,
object_hit,,SFX\Levels\zombie\maps\giant\flytrap\object_hit.wav,0.8,0.8,1,1,50,1000,,,,,,full_vol,,3d,,,,,,curve3,,,,object_hit_l,,curve3,,,,0.6,,,,,,,0.2,,,,,20,40,0.25,1,
object_hit_l,,SFX\Levels\zombie\maps\giant\flytrap\object_hit_l.wav,0.8,0.8,1,1,50,1000,,,,,,full_vol,,3d,,,,,,curve3,,,,object_hit_r,,curve3,,,,0.6,,,,,,,,left_player,3,,,20,40,0.25,1,
object_hit_r,,SFX\Levels\zombie\maps\giant\flytrap\object_hit_r.wav,0.8,0.8,1,1,50,1000,,,,,,full_vol,,3d,,,,,,curve3,,,,,,curve3,,,,0.6,,,,,,,,right_player,3,,,20,40,0.25,1,
meteor_affirm,,SFX\Levels\zombie\maps\giant\meteor_affirm.wav,0.45,0.45,0.85,1.05,50,600,,,,,,full_vol,,3d,,,,,,curve2,,,pitch,,,curve3,,,,1,,,,,,,0.3,,,,,5,10,0.1,1,
meteor_loop,,SFX\Levels\nazi_zombie_sumpf\meteor\meteor_loop.wav,0.5,0.5,0.85,1.05,50,600,,,,,,full_vol,,3d,,,looping,,,curve2,,,pitch,,,curve3,,,,1,,,,,,,0.3,,,,,5,10,0.1,1,
eggs2,,eggs2.wav,1,1,1,1,,,,,,,,voice,,2d,streamed,,,,,,,,,,,,,1000,wpn_all,,,,,,,,,,,,,40,60,0.25,1,

so for the meteor_affirm i use this
Code Snippet
Plaintext
playsoundatposition("meteor_affirm", self.origin);
and for the song this
Code Snippet
Plaintext
PlaySoundAtPosition("eggs2", (0, 0, 0));


EDIT
the meteor_affirm work with this
Code Snippet
Plaintext
PlaySoundAtPosition("meteor_affirm", (0, 0, 0));
Last Edit: December 28, 2013, 10:04:16 pm by KDXDARK
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 3 years ago
Posts
5,544
Respect
6,646Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
Your egg sound is 2d, you should use playsound() to play it. Try

Code Snippet
Plaintext
player playsound("eggs2");
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 4 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
Your egg sound is 2d, you should use playsound() to play it. Try

Code Snippet
Plaintext
player playsound("eggs2");

i try that and give me error, so i add it

Code Snippet
Plaintext
player = undefined;

and dont work
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 3 years ago
Posts
5,544
Respect
6,646Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
i try that and give me error, so i add it

Code Snippet
Plaintext
player = undefined;

and dont work
Of course if player is undefined it's not going to work...  :poker:

In your meteor function you have the player variable already there... just add the line I gave you there.
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: ar
Date Registered: 21 August 2011
Last active: 4 days ago
Posts
1,323
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
Personal Quote
This game isn't meant to be played
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Mapper Has released one or more maps to the UGX-Mods community.
KDXDARK's Contact & Social Links
Of course if player is undefined it's not going to work...  :poker:

In your meteor function you have the player variable already there... just add the line I gave you there.

http://pastebin.com/7BnFjrWA

 
Loading ...