!sound command

  • TheAwesomeMutant
    20th Dec 2016 Member 0 Permalink

    Ok, I know what the sound command does and how it works, but to enable it on windows you had to add 'sound' to the property's of the shortcut or launch with the command prompt. I recently ported over to linux and i'm using wine to run TPT++. How would I enable this on linux? Do I have to download the linux version?

    Edited 2 times by TheAwesomeMutant. Last: 20th Dec 2016
  • QuanTech
    20th Dec 2016 Member 1 Permalink

    !sound command. Wat. What does it do??? I feel like I have been living under a rock now!

  • TheAwesomeMutant
    20th Dec 2016 Member 0 Permalink

    It plays a .wav file.

    To use (windows):

    Right click on start menu icon

    Click 'Open Command Prompt'

    Type 'cd PowderToyDirectoryHere'

    Hit Enter

    Type 'powder sound'

    Hit Enter

    Powder Toy will open

    Press the '~' key

    Type '!sound sound.wav'

    Listen!

     

    Sadly, the same method doesn't work on linux

     

    EDIT: Wine is very confusing. Got powder to launch w/ terminal, no sound.

    Edited 2 times by TheAwesomeMutant. Last: 20th Dec 2016
  • jacob1
    20th Dec 2016 Developer 0 Permalink
    I just checked the source to confirm, it says "//the nohud, sound, and scripts commands currently do nothing."'

    Back when TPT was rewritten 4 years ago, the !sound command was removed. I'm pretty sure it hasn't worked since then. All it ever did was play a .wav file, that's much better done in an actual music player.
  • TheAwesomeMutant
    20th Dec 2016 Member 0 Permalink

    It still worked in TPT++, but it could only play one file at a time and it would loop, so I guess it's for the better. Also, I recommend just removing it since it's so hard to use and barely works whatsoever.

     

    P.S. Could you recommend any way to play a sound file in TPT++?(I don't care what type, I'll find a way to run on linux.) Since forever, people have always asked for sound in TPT, and instead of waiting for someone to do it for me, i'm doing for them.

     

    P.S.S. I'm also willing to use program that you can launch from TPT++, given it runs in the backround.

    Edited once by TheAwesomeMutant. Last: 20th Dec 2016
  • boxmein
    20th Dec 2016 Former Staff 0 Permalink
    @TheAwesomeMutant (View Post)
    SDL has audio primitives that you can use in SDL_audio
  • TheAwesomeMutant
    31st Dec 2016 Member 0 Permalink

    @boxmein (View Post) SDL succesfully plays audio, but on devices without SDL, static plays until the error message fades away. How would I go about forcing SDL install?

     

    P.S. Is it possible to have the script download some files? I want it to automaticly download sound files, and would it require a special server? I'd rather it be from google drive.