Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

creating seasonal event, need help with ats script to start event

statci

Member

#===================================================
# â–  ATS - Advanced Time System
#===================================================
# Rewiten by Near Fantastica
# Date: 23.07.05
# Version: 1
#
# Written by Dubealex
# Date: 26.11.04
#===================================================



ok i'm using this script, and i want for when its spring and summer for an even to activate. see i'm using crops in my game and i want so that you can only get them during a certain season. i am planing to use this by way of an event.

lets say i have like a conditional branch that if its spring or summer the even is active. something like that. or if anyone would have any other idea it would be good, i'm a major novice but i want this, any help would be good.


#===================================================
# â–  ATS - Advanced Time System
#===================================================
# Rewiten by Near Fantastica
# Date: 23.07.05
# Version: 1
#
# Written by Dubealex
# Date: 26.11.04
#
# Thanks to Satana_81 for the test tilesets
#===================================================

#===================================================
# â–¼ CLASS Advanced_Time Begins
#===================================================
class Advanced_Time

attr_reader :define_start_sec

def initialize
@weather_pattern = []
@cycle_period=[]
@tint_period=[]
@cycle_season=[]
@name_period=[]
@name_season=[]
@name_month=[]
@name_day=[]
@start_clock=[]
@start_date=[]

=begin -----------------------------------------------------------------------------------------------------
â–  Advanced Time System Settings:
---------------------------------------------------------------------------------------------------------
â–¼ Day Night System Transitioning :

The DNS is built in to the time system and therefore any map you want to have the DNS
active on place a "*" in the name of the map.
---------------------------------------------------------------------------------------------------------
â–¼ Method of Season Transitioning :

â—
 
Ah, I've done this before, with my HM game. Used Kylock's Time System myself, wierd that this one has 2 autumns and summers...

I think this may do it, but someone may come up with an easier way:
Code:
def initialize
  def Crops
    if @name_season = ["Spring"]
      $game_switches[1] = true  #change [1] to whichever switch number you want spring to be
    else $game_switches[1] = false  #same number as previous
    end
    if @name_season = ["Summer"]
      $game_switches[2] = true  #change [2] to whichever switch number you want summer to be
    else $game_switches[2] = false  #same number as previous
    end
    if @name_season = ["Autumn"]
      $game_switches[3] = true  #change [3] to whichever switch number you want autumn to be
    else $game_switches[3] = false  #same number as previous
    end
    if @name_season = ["Winter"]
      $game_switches[4] = true  #change [4] to whichever switch number you want spring to be
    else $game_switches[4] = false  #same number as previous
    end
  end
end

Put this in a new Script below the ATS and above Main.
 

statci

Member

hey it worked it called the switch thx, but i now have another problem. Ok thing is i was going for something where i could pick the crops and then next spring they reappear and i could do it all over again. what i did was i have the even appear in spring with the script you gave 4StarGeneral,  but then when i turn the switch i used to call the event off, it dosn't reappear next spring.
I don't know what i'm doing wrong.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top