
Posts
17
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!#using zmutility
For()
Var player Get players[i]
zmutility::playsound('sound', 'player')
End
[code]
#using scripts\zm\_zm_utility; //This line goes else where, you can figure it out
function ouijfadregiojharegregajkuharegujkharegkjhregakjharegjhklaregjkh() {
players = getplayers();
for(i=0; i<players.size; i++)
{
zm_utility::play_sound_at_pos('sound', 'players[i].origin');
}
}
//put the following line in the main class.
ouijfadregiojharegregajkuharegujkharegkjhregakjharegjhklaregjkh();
Hahah guys, all i wanted is to get a simple line of code
level.playSoundLocation GetEnt("SoundEntity", "targetname"); //make a sound struct or position struct with those key/values
//Now if you put,
level.playSoundLocation PlaySound("welcoming_sound"); //it might work. "PlaySound" might not be global, or you could be missing arguments. It could be local only. That's why I gave you my own function. I have no idea how "PlaySound" works.
asound GetEnt("SoundEnt","targetname");
asound PlaySound("welcoming_sound");
callback::on_spawned( &on_player_spawned );
function main()
{
zm_usermap::main();
callback::on_spawned( &on_player_spawned );
//Setup the levels Zombie Zone Volumes
level.zones = [];
level.zone_manager_init_func =&usermap_test_zone_init;
init_zones[0] = "start_zone";
level thread zm_zonemgr::manage_zones( init_zones );
level thread add_zm_vox();
level.pathdist_type = PATHDIST_ORIGINAL;
}
function usermap_test_zone_init()
{
level flag::init( "always_on" );
level flag::set( "always_on" );
}
function custom_add_weapons()
{
zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
}
//WELCOMING SCREEN
function on_player_spawned()
{
level.playSoundLocation PlaySound("welcoming_sound");
self.diamond_text = NewClientHudElem( self );
self.diamond_text.alignX = "center";
self.diamond_text.alignY = "middle";
self.diamond_text.horzAlign = "center";
self.diamond_text.vertAlign = "middle";
self.diamond_text.foreground = true;
self.diamond_text.font = "bold";
self.diamond_text.fontScale = 2;
self.diamond_text.color = ( 0.5, 1, 0.5 );
self.diamond_text SetText("Survive at all costs...");
self.diamond_text setCOD7DecodeFX(100, 10000, 500);
wait(17);
self.diamond_text Destroy();
level.playSoundLocation PlaySound("welcoming_sound");
self PlayLocalSound( "welcoming_sound" );
asound GetEnt("SoundEnt","targetname");
asound PlaySound("welcoming_sound");
asound = GetEnt("SoundEnt","targetname");
asound PlaySound("welcoming_sound");