Vendily

Female
Seen 2 Hours Ago
Posted 21 Hours Ago
896 posts
3.9 Years
The sandstorm evo method is very similar to the already implemented rain evo, so that would be a great place to start.
when PBEvolution::LevelRain
    if pokemon.level>=level
      if $game_screen && ($game_screen.weather==PBFieldWeather::Rain ||
                          $game_screen.weather==PBFieldWeather::HeavyRain ||
                          $game_screen.weather==PBFieldWeather::Storm)
        return poke
      end
    end
Now we don't need to worry about PBWeather, because that's for in battle weather, and pokemon can't evolve in battle.
when PBEvolution::LevelSandstorm
    if pokemon.level>=level
      if $game_screen && ($game_screen.weather==PBFieldWeather::Sandstorm)
        return poke
      end
    end
That'll do the trick. There's a lot to learn from the default scripts, so it's a good idea to always give a quick look at stuff that's similar to what you want.
CTRL + SHIFT + F lets you search all script sections at once, making tracking down what you are looking for way easier!