• 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.
  • 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!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

Date Based Events?

RaulCortez

Maybe active...sometimes?
  • 94
    Posts
    13
    Years
    Hey guys!

    I was thinking about this since i'd love to implement this on my game, but I don't know if it's a possibility.

    I know I can make an event appear or disappear according to the time of day or day of the week, but I wanted to know if I can actually make them appear at a specific date of the year, as well.

    Let's say a legendary pokemon that appears on October the 31st, or maybe the look of a town changes on December 24th (By ornaments appearing on the houses - those could be events as well, etc.)

    So date based events. Hopefully you got the gist of it. Is that possible? Thanks!
     
    Code:
    def pbIsDate?(month,day)
      mo=Time.now.month
      da=Time.now.day
      return true if mo==month && da==day
      return false
    end

    then name a few of your switches things like "s:pbIsDate?(10,31)" and "s:pbIsDate?(12,24)" and make your events run on those switches
     
    Thanks a bunch, man! That's just what i needed!

    Just one question though, where should i put that piece of code exactly? on which script in specific?

    I figured i'd ask before i go around putting things on the wrong places and getting a load of errors {XD}
     
    I'd suggest in its own script section above Main, but theoretically, adding it to the very bottom of any script section is fine. Just as long as you don't put it inside another function or class or module or something.
     
    I'd suggest in its own script section above Main, but theoretically, adding it to the very bottom of any script section is fine. Just as long as you don't put it inside another function or class or module or something.

    Perfect, I'll put it on its own section then. Thanks a lot, I'll make sure to credit you for this!
     
    Back
    Top