Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Loading External Sound Help  (Read 868 times)

0 Members and 1 Guest are viewing this topic.
Loading External Sound Help
« on: June 03, 2007, 11:10:43 pm »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
Well im pretty sure i got the command down
sound_add(Fname,kind,preload) but the sound is in folder called Sounds

like
..
Zelda.gmk
/Sound


theres my directory simulation :P

so i tried to add a constant named Sound as /Sound/but it wont work.

any ideas?
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog

Goodnight

Once and future Captain
Re: Loading External Sound Help
« Reply #1 on: June 04, 2007, 05:50:05 am »
  • With a Capital G
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 706
'Did something like this for my game, except for backgrounds.. let me go check how it worked.

Ah, here it is:
Code: [Select]
strFolder = "Sound"
strFile = "mysound.wav"  // just an example
sound_add(working_directory + "\" + strFolder + "\" + strFile, kind, preload)

If you don't want to use those extra variables, it'll look like:
Code: [Select]
sound_add(working_directory + "\Sound\mysound.wav", kind, preload)
Logged
Re: Loading External Sound Help
« Reply #2 on: June 04, 2007, 06:24:07 am »
  • *
  • Reputation: +1/-0
  • Offline Offline
  • Gender: Male
  • Posts: 4588
Jesus Rev, I helped you on MSN...

Create Event:

Music_File = sound_add(working_directory+"/Sound/File000.wav",3,true);
sound_play(Music_File);

End Room or Destroy event or something (when it isnt needed):
sound_delete(Music_File);
Logged
the a o d c
Re: Loading External Sound Help
« Reply #3 on: June 04, 2007, 06:25:03 am »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
yeah this posted before :P
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.22 seconds with 45 queries.