RPG Maker Forums

This post started out as a question but I figured it out so here is what I've learned.

This is the bit of code that i am working on currently that allows you to check time.
 

  #=============================================================================  # * Get Event Time by Index  #=============================================================================  def self.event_time(index)      evtime = {  :year => Time_Events[index][:time][5],                  :month => Time_Events[index][:time][4],                  :day => Time_Events[index][:time][3],                  :hour => Time_Events[index][:time][2],                  :minute => Time_Events[index][:time][1],                  :second => Time_Events[index][:time][0],                }    return evtime  end    #=============================================================================  # * Events Update? by Index  #=============================================================================  def self.events_update?(index)    return false if $game_system.event_activation_states[index] == true    time = false, st = system_time, et = event_time(index)    et.each_key { |i|      if et.is_a?(String)        next      else        if st > et          return true        else          if st == et            time = true          else            return false          end        end      end    }    return time  endThe System Time is set up the same exact way. Whenever you check a time against another time you should start with the most priority.

For this example if the system time's year is greater then the event times year then obviously the rest of the times do not matter and so on.

Latest Threads

Latest Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,189
Members
137,771
Latest member
evoque
Top