List of project files [Solved]

0 favourites
  • 7 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • Is there a way to get a list of all files the game uses. Like a list of the sounds, for example, so I could then pick one at random for the game to play.

  • I'm not sure for a web or app export, but with nw.js in a desktop export you can get filenames with the listat() expression from a directory, and use that to build a list of your sound files. Then play by name.

    I think for web/mobile export you'll need to manually create a list of sounds you want to play. I'd make a little side utility to create this list for me with nw.js if it is updated often. Then I'd save the list and use that as a project file in my actual project.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can play audio by name. So if you na.e your files smart, you can do it that way i think.

  • You can play audio by name. So if you name your files smart, you can do it that way i think.

  • Yeah I've used expressions like "attack" & str(round(random(10)) for example.

    Is there a way to randomly pick a key from a dictionary without using for each key?

  • Not a dictionary, but you can with an array.

    Unless you want to put your dictionary keys in an array and randomly pick a key to look up the file name in the dictionary. Might as well just put the file name in the array though.

  • I think I solved it with this information by adding sound file names to a list when they play which sort of lends more to what I was trying to do anyway. Thanks everyone.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)