Hello again! I decided to try and figure out my last problem by myself, and this is the result. I edited Game_Map's refresh Method so that every time it refresh's the variable count changes. If count == 20, then a bunch of conditional's go into effect that decide a weather change, using Ccoa's Weather script. I need to know if it would even work?
Here is the revised method:
My game run's fine, but nothing happens. Every so often I gain a little lag, but other than that, nothing changes. I need to know how my count variable actually works (I got it from an other help topic), and why nothing ever changes. I know it's a bit long to look through, but I would really appreciate it.
Peace Out!
~Broken
Here is the revised method:
Code:
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# If map ID is effective
if @map_id > 0
# Refresh all map events
for event in @events.values
event.refresh
end
# Refresh all common events
for common_event in @common_events.values
common_event.refresh
end
# Refresh Weather
@count = (@count + 1) % 140
if @count == 20
weather_types = RandWeather::WEATHER
i = 0
case rand(weather_types.size - 1)
when i
$game_screen.weather(0, 0, 0)
when i + 1
rate = RandWeather::RATE[i + 1]
occurs = (rate * 2.0) / 2
if occurs > 2.5
rndm = rand(2)
if rndm >= 1
change = true
else
change = false
end
elsif occurs <= 2.5
rndm = rand(3)
if rand >= 2
change = true
else
change = false
end
end
if change == true
$game_screen.weather(weather_type[i + 1], (rand(49) + 1), (rand(9) + 1))
end
when i + 2
rate = RandWeather::RATE[i + 1]
occurs = (rate * 2.0) / 2
if occurs > 2.5
rndm = rand(2)
if rndm >= 1
change = true
else
change = false
end
elsif occurs <= 2.5
rndm = rand(3)
if rand >= 2
change = true
else
change = false
end
end
if change == true
$game_screen.weather(weather_type[i + 2], (rand(49) + 1), (rand(9) + 1))
end
when i + 3
rate = RandWeather::RATE[i + 1]
occurs = (rate * 2.0) / 2
if occurs > 2.5
rndm = rand(2)
if rndm >= 1
change = true
else
change = false
end
elsif occurs <= 2.5
rndm = rand(3)
if rand >= 2
change = true
else
change = false
end
end
if change == true
$game_screen.weather(weather_type[i + 3], (rand(49) + 1), (rand(9) + 1))
end
end
end
end
# Clear refresh request flag
@need_refresh = false
end
My game run's fine, but nothing happens. Every so often I gain a little lag, but other than that, nothing changes. I need to know how my count variable actually works (I got it from an other help topic), and why nothing ever changes. I know it's a bit long to look through, but I would really appreciate it.
Peace Out!
~Broken