+ Reply to Thread
Results 1 to 5 of 5

Thread: [E2] Sound Retrieval Functions

  1. #1
    Wire Noob Koutacles's Avatar
    Join Date
    Jun 2009
    Posts
    25

    Smile [E2] Sound Retrieval Functions

    This custom E2 extension can:
    - Return an array that contains a list of sound files (mp3/wav) in the specified directory (relative to hl2/sound/) using array=soundList(Path) e.g. Motors=soundList("vehicles")
    - Return 1 or 0 indicating whether the single specified sound exists or not using number=soundExists(PathToFile) e.g. HasHL1=soundExists("HL1/fvox/beep.wav")

    I thought it would be useful for making dynamic console-screen based music players as you could check whether the server you were on had Portal music or TF2 sounds, or even get a list of the server's custom sounds (as long as you knew the directory).

    Whatcha think?

  2. #2
    Wire Sofaking Wizard of Ass's Avatar
    Join Date
    May 2009
    Location
    Germany Bremerhaven
    Posts
    1,044

    Default Re: [E2] Sound Retrieval Functions

    Needs high costs but not bad.
    seriously getting serious

  3. #3
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: [E2] Sound Retrieval Functions

    The only problem with this is that it doesn't know which sounds the clients have. Every client on the server could have TF2, while the server does not... But that isn't really a very big deal.
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  4. #4
    Wire Noob Koutacles's Avatar
    Join Date
    Jun 2009
    Posts
    25

    Default Re: [E2] Sound Retrieval Functions

    Quote Originally Posted by Wizard of Ass View Post
    Needs high costs but not bad.
    How do you set E2 function costs, and what do you think good costs would be?

  5. #5
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: [E2] Sound Retrieval Functions

    Quote Originally Posted by Koutacles View Post
    How do you set E2 function costs, and what do you think good costs would be?
    Look at other E2 files in the exp2/core folder.
    I think it's something like
    __e2setcos(number)
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots