Fog Effect 1.0 Falcao ScriptIntroduction:Are you tire of those monotone maps? here i bring you the solution!!
This script allow you show Fog Effects on map,
Features- Fog effects graphics on map
- Fog zoom
- Fog Scrool X or Y
- Others features
InstructionsCopy and paste the script to your project, and then inport the fog graphics to the folder Pictures
Call the script using the following command
$game_map.fog("Fog Name", Opacity, Zoom , Scroll_x, Scroll_y)
Example: using standar configuration
$game_map.fog("sombra2",50,2,1,1)
Fog Graphics must be in folder Pictures
Script:#====================================================================#
# #*****************# Fog effect V1.0 Falcao script #
# #*** By Falcao ***# Allow fog effects graphics on map #
# #*****************# #
# RMVX Instalation: Copy and paste the #
# makerpalace.onlinegoo.com script to your porject #
#====================================================================#
#--------------------------------------------------------------------
# * How to use
#
# Call the script using the following command
#
# $game_map.fog("Fog Name", Opacity, Zoom , Scroll_x, Scroll_y)
#
# Example: using standar configuration
# $game_map.fog("sombra2",50,2,1,1)
#
# Fog Graphics must be in folder Pictures
#
# Author notes:
# This script can be used in comercial or non-comercial games
# Credits to Falcao
#
#---------------------------------------------------------------------
module Falcao
# Scrool fog graphics whith the screen change (true or false)
DinamicScroll = true
end
class Game_Map
attr_accessor :fog_name
attr_accessor :fog_opacity
attr_accessor :fog_zoom
attr_accessor :fog_sx
attr_accessor :fog_sy
attr_reader :fog_ox
attr_reader :fog_oy
alias falcaofogSini initialize
def initialize
@fog_start = true
falcaofogSini
end
alias falcao_setup setup
def setup(map_id)
falcao_setup(map_id)
setup_fog
end
def setup_fog
if @fog_start
@fog_name = ""
@fog_opacity = 0
@fog_zoom = 0
@fog_sx = 0
@fog_sy = 0
@fog_ox = 0
@fog_oy = 0
@fog_start = false
end
end
alias falcaofog_update update
def update
falcaofog_update
update_fog
end
def update_fog
@fog_ox -= @fog_sx / 8.0
@fog_oy -= @fog_sy / 8.0
end
def fog(name,opacity,zoom,scroll_x,scroll_y)
@fog_name = name
@fog_opacity = opacity
@fog_zoom = zoom
@fog_sx = scroll_x
@fog_sy = scroll_y
end
end
class Spriteset_Map
alias falcaofogini initialize
def initialize
create_fog
falcaofogini
end
def create_fog
@fog = Plane.new(@viewport1)
@fog.z = 3000
end
alias falcaofog_dispose dispose
def dispose
falcaofog_dispose
dispose_fog
end
def dispose_fog
@fog.dispose
end
alias falcaofogSupdate update
def update
falcaofogSupdate
update_fog
end
def update_fog
if @fog_name != $game_map.fog_name
@fog_name = $game_map.fog_name
if @fog.bitmap != nil
@fog.bitmap.dispose
@fog.bitmap = nil
end
if @fog_name != ""
@fog.bitmap = Cache.picture(@fog_name)
end
Graphics.frame_reset
end
@fog.zoom_x = $game_map.fog_zoom
@fog.zoom_y = $game_map.fog_zoom
@fog.opacity = $game_map.fog_opacity
if Falcao::DinamicScroll == true
@fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
@fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
else
@fog.ox = 4 + $game_map.fog_ox
@fog.oy = 4 + $game_map.fog_oy
end
end
end
Here a example Fog graphic ready to useImport to Picture Folder
DemoDemo include Fog Pack!!
http://www.mediafire.com/download.php?jazxmndknylCreditsBy FaLcao
This script can be used in comercial or non-comercial games
Screens