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

Problem using PlaySound()

broken avatar :(
Created 7 years ago
by Archaicvirus
0 Members and 1 Guest are viewing this topic.
1,474 views
broken avatar :(
×
broken avatar :(
Location: usSouth Florida
Date Registered: 10 July 2016
Last active: 12 months ago
Posts
106
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
Signature
Let he who has not sinned cast the first stone.
×
Archaicvirus's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Archaicvirus's Contact & Social Links
I swear I set up everything properly, but when I try to play crafting sounds via script, only one of them plays. This is my setup:

SZC File:
Code Snippet
Plaintext
{
 "Name" : "zm_compund",
 "GameMode" : "mpl",
 "IsCommon" : false,
 "Parent" : "",
 "Overlay" : "",
 "IsStandalone" : true,
 "IsProduction" : false,
 "IsShipped" : false,
 "DontDeploy" : false,
 "NoStreamBank" : false,
 "MapFile" : "",
 "Standalone" : true,
 "Builds" : [ "T7" ],
 "Sources" : [
 {
 "Type" : "ALIAS",
 "Name" : "user_aliases",
 "Filename" : "user_aliases.csv",
 "Specs" : [ ]
}
]
}

Zone File:

Code Snippet
Plaintext
>class,zm_mod_level
>group,modtools

xmodel,skybox_default_day
material,luts_t7_default

// BSP
col_map,maps/zm/zm_compund.d3dbsp
gfx_map,maps/zm/zm_compund.d3dbsp

// Audio
sound,zm_compund

scriptparsetree,scripts/zm/zm_compund.gsc
scriptparsetree,scripts/zm/zm_compund.csc
scriptparsetree,scripts/zm/e115_collector.gsc
scriptparsetree,scripts/zm/e115_follower.gsc
scriptparsetree,scripts/zm/custom_buildables_random.gsc
xmodel,p7_zm_der_pswitch_body
xmodel,p7_zm_der_pswitch_handle
xmodel,p7_zm_zod_fuse
fx,custom/elec_orb
fx,custom/elec_orb_minion
fx,custom/elec_orb_impact

user_aliases.csv:

Code Snippet
Plaintext
Name,Behavior,Storage,FileSpec,FileSpecSustain,FileSpecRelease,Template,Loadspec,Secondary,SustainAlias,ReleaseAlias,Bus,VolumeGroup,DuckGroup,Duck,ReverbSend,CenterSend,VolMin,VolMax,DistMin,DistMaxDry,DistMaxWet,DryMinCurve,DryMaxCurve,WetMinCurve,WetMaxCurve,LimitCount,LimitType,EntityLimitCount,EntityLimitType,PitchMin,PitchMax,PriorityMin,PriorityMax,PriorityThresholdMin,PriorityThresholdMax,AmplitudePriority,PanType,Pan,Futz,Looping,RandomizeType,Probability,StartDelay,EnvelopMin,EnvelopMax,EnvelopPercent,OcclusionLevel,IsBig,DistanceLpf,FluxType,FluxTime,Subtitle,Doppler,ContextType,ContextValue,ContextType1,ContextValue1,ContextType2,ContextValue2,ContextType3,ContextValue3,Timescale,IsMusic,IsCinematic,FadeIn,FadeOut,Pauseable,StopOnEntDeath,Compression,StopOnPlay,DopplerScale,FutzPatch,VoiceLimit,IgnoreMaxDist,NeverPlayTwice,ContinuousPan,FileSource,FileSourceSustain,FileSourceRelease,FileTarget,FileTargetSustain,FileTargetRelease,Platform,Language,OutputDevices,PlatformMask,WiiUMono,StopAlias,DistanceLpfMin,DistanceLpfMax,FacialAnimationName,RestartContextLoops,SilentInCPZ,ContextFailsafe,GPAD,GPADOnly,MuteVoice,MuteMusic,RowSourceFileName,RowSourceShortName,RowSourceLineNumber
zmb_craftable_pickup,,,wpn\craftable.wav,,,UIN_MOD,,,,,,grp_weapon,snp_wpn_1p_shot,,,,99,100,,,,,,,,,,,,,,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_craftable_buy_shield,,,wpn\craftable.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_craftable_complete,,,wpn\zmb_build_completed.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_buildable_complete,,,wpn\trial_complete.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,LOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_buildable_piece_add,,,wpn\relic_pickup.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_craftable_loop,,,wpn\zmb_building_lp.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,LOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_craftable_buy_shield,,,wpn\craftable.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Script where I'm calling PlaySound()

Code Snippet
Plaintext
  ///////////////////////////////////////
 //          BUILD LOGIC              //
///////////////////////////////////////
function build_logic(bench_fx_loc, final_flag, part1_flag, part2_flag, part3_flag, build_hint){
while(1){
if(level flag::get(part1_flag) && level flag::get(part2_flag) && level flag::get(part3_flag)){
self SetHintString("Hold &&1 to build "+build_hint);
self waittill("trigger", player);
self SetHintString("");
player PlaySound("zmb_craftable_loop");
PlayFX(level._effect["building_dust"], bench_fx_loc);
player thread crafting_hud(self, final_flag);
player thread custom_craft_anim();
player util::waittill_any("build_canceled", "build_completed");
player StopSounds();
if(self.built == true){
player PlaySound("zmb_craftable_complete");
self Delete();
break;
}
}else
wait(1);
}
}

It only plays the "zmb_craftable_complete" sound, but it won't play the building loop sound, and it won't play the 'pickup' sound as shown below

Code Snippet
Plaintext
  ///////////////////////////////////////
 //        PART PICKUP LOGIC          //
///////////////////////////////////////
function part_pickup(flag, hint, part){
self SetCursorHint("HINT_NOICON");
self SetHintString("Press &&1 to pickup "+hint);
self waittill("trigger", player);
level flag::set(flag);
player PlaySound("zmb_buildable_piece_add");
wait(0.1);
PlayFX(level._effect["powerup_grabbed"], self.origin);
part Delete();
self Delete();
}

Am I missing something?  I checked in root/sound_assets, and all the .WAV files are there, and in the correct folders. I even opened the files in audacity, and they're all set to 48000 which is correct. I even tried re-converting them in audacity and renamed them and same thing, only the one sound plays. It doesn't make sense.
Marked as best answer by Archaicvirus 7 years ago
broken avatar :(
×
broken avatar :(
Location: usSouth Florida
Date Registered: 10 July 2016
Last active: 12 months ago
Posts
106
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
×
Archaicvirus's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Archaicvirus's Contact & Social Links
Solved. I ended up using this sound export tool I found on google. I was able to extract about 1000 files from zetsubo, and I formatted the ones I wanted in audacity after picking through them. I then set up all the aliases for the new sounds.

I also realized that the script I was working on in sublime, was using the save directory from another map's script folder, so essentially all the changes I was making in script didn't matter because when I compiled the map it was using an old version of the buildables script that wasn't being updated, due to the file in sublime being open sand saving to the wrong directory.

Here's a short video demonstrating the sound effects working, and a teaser of some custom content that will be in a future map release.


 
Loading ...