• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

Day/Night Fogs using Scripts

  • 172
    Posts
    8
    Years
    • Seen Sep 6, 2022
    I have a fog for a town at night, just with lights and stuff, and im just trying to make it work at night using a script. I don't want to put it as the tileset fog because it only applies to that one map. I want to make it a script. I have a script that activates it already, but its always active. I just need to edit the script to have it work at night only.

    this is the script
    https://postimg.cc/3k109jjt
    I have my shade setting to true in my scripts. I read somewhere that naming the script "OutdoorLight" makes it work during nay/night but that isn't working either.
     
    Put the script under a conditional branch and set it to be only active if the global switch 15 is true. The switch should have the name "s:PBDayNight.isNight?(pbGetTimeNow)", which checks if it is currently nighttime (8 p.m to 6 a.m).

    You can also set an else-case, which will set the current fog to None.
     
    Last edited:
    Put the script under a conditional branch and set it to be only active if the global switch 15 is true. The switch should have the name "s:PBDayNight.isNight?(pbGetTimeNow)", which checks if it is currently nighttime (8 p.m to 6 a.m).

    You can also set an else-case, which will set the current fog to None.

    Cool, that worked too, thank you! :)
    yeah I wasn't sure with the conditional branches if you could just leave them blank, but it slipped my mind to just put the else as none...lol
     
    Last edited:
    Back
    Top