RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Script Fog effects on map! V1.0

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 83
                               Fog Effect 1.0 Falcao Script

Introduction:

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

Instructions

Copy 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:

Code: [Select]
#====================================================================#
#  #*****************#           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 use

Import to Picture Folder

Spoiler for:



Demo

Demo include Fog Pack!!

http://www.mediafire.com/download.php?jazxmndknyl


Credits

By FaLcao

This script can be used in comercial or non-comercial games


Screens

Spoiler for:



Spoiler for:



« Last Edit: September 12, 2009, 04:57:05 PM by Dark_falcao »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
This looks very nice. I don't know why Fogs were taken out after XP

**
Rep: +0/-0Level 82
Can you toogle off the fog?  ???
There is no signature here.

**
Rep: +0/-0Level 76
RMRK Junior
Sorry for bump, but yeah, is there a way to turn off the fog?

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
I'm guessing you could make a blank fog and just use:

$game_map.fog("Fog Name", Opacity, Zoom , Scroll_x, Scroll_y)

***
Rep:
Level 77
RMRK Junior
Set zoom to 0