Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # weather in battle
- # by Mithran
- # insert in materails in script editor. You may then call weather effects in battle
- # this snippet does not automatically turn off weather effects, make sure you turn them off
- class Game_Interpreter
- def command_236
- screen.weather(@params[0], @params[1], @params[2])
- @wait_count = @params[2] if @params[3]
- return true
- end
- end
- class Spriteset_Battle
- alias initialize_weatherbattle initialize
- def initialize(*args)
- create_weather
- initialize_weatherbattle(*args)
- end
- alias dispose_weatherbattle dispose
- def dispose
- dispose_weatherbattle
- dispose_weather
- end
- alias update_weatherbattle update
- def update
- update_weatherbattle
- update_weather
- end
- def create_weather
- @weather = Spriteset_Weather.new(@viewport2)
- end
- def update_weather
- @weather.type = $game_troop.screen.weather_type
- @weather.max = $game_troop.screen.weather_max
- @weather.ox = 0
- @weather.oy = 0
- @weather.update
- end
- def dispose_weather
- @weather.dispose
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment