• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Weather with sfx

  • 211
    Posts
    7
    Years
    • Seen May 23, 2024
    Hi..I need help.
    How to add sfx in weather scripts?
    I'm using PE v18.1
    Thank you^^
     
  • 53
    Posts
    8
    Years
    Scripts don't make music or soundeffects, do they? I'd recommend using a weather sfx that you like and put it in your Audio > BGM (or BGS) file and then select it from your Sound Test option in your editor. At least that's how I did it (I have wind, thunder and / or rain noises on my maps).

    Edit: If you want to have a random weather sound take place, create an event anywhere on that map and have it generate a random number. Then make (in the same event) a conditional branch and assign different "Play BGM / Play BGS (or wherever you put your desired weather sounds)" to different numbers.

    If you want the weather effects to possibly switch randomly, you should add labels to that same event as well as a counter. Whenever your event generates a random number and activates one of the conditional branches (this would be label 1), your event should at the same time jump to label 2 (or whatever number you assign to the label) where it adds +1 to the counter. Then it should jump to another label where the event waits for some time. After the time has run out, the event should jump back to label 1, where it generates another random number which activates the whole process again. That way you can add some variety to your weather-effects.

    Edit 2: I should mention, that you can have several different labels in that event, where every label has a different waiting time to add to your "randomness". Depending on the value of your counter, the event should jump to different labels. Of course, your counter shouldn't go up infinitely, so you have to reset the counter at one point within the event. It may sound rather convoluted, but it really isn't. If you like, I can share a screenshot or whatever of one of my events that do this.
     
    Last edited:
  • 211
    Posts
    7
    Years
    • Seen May 23, 2024
    Scripts don't make music or soundeffects, do they? I'd recommend using a weather sfx that you like and put it in your Audio > BGM (or BGS) file and then select it from your Sound Test option in your editor. At least that's how I did it (I have wind, thunder and / or rain noises on my maps).

    Edit: If you want to have a random weather sound take place, create an event anywhere on that map and have it generate a random number. Then make (in the same event) a conditional branch and assign different "Play BGM / Play BGS (or wherever you put your desired weather sounds)" to different numbers.

    If you want the weather effects to possibly switch randomly, you should add labels to that same event as well as a counter. Whenever your event generates a random number and activates one of the conditional branches (this would be label 1), your event should at the same time jump to label 2 (or whatever number you assign to the label) where it adds +1 to the counter. Then it should jump to another label where the event waits for some time. After the time has run out, the event should jump back to label 1, where it generates another random number which activates the whole process again. That way you can add some variety to your weather-effects.

    Edit 2: I should mention, that you can have several different labels in that event, where every label has a different waiting time to add to your "randomness". Depending on the value of your counter, the event should jump to different labels. Of course, your counter shouldn't go up infinitely, so you have to reset the counter at one point within the event. It may sound rather convoluted, but it really isn't. If you like, I can share a screenshot or whatever of one of my events that do this.

    Thanks for help^^
     
    Back
    Top