Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

Share | 
 

 [ASK] Ada yang tau Script FOG?

Topik sebelumnya Topik selanjutnya Go down 
[ASK] Ada yang tau Script FOG? Empty2012-05-19, 18:02
Post[ASK] Ada yang tau Script FOG?
#1
inchy 
Newbie
Newbie
inchy

Level 5
Posts : 78
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Spriter

[ASK] Ada yang tau Script FOG? Vide
maaf para tetuah,saya dari tadi nyari Script buat Fog atau awan, pas ane cari di forum tetangga pada gak ada ( ke apus mungkin tritnya) jadi kalo ada yang tau script nya tolong di bagi :D


EDIT(by F#)
sepertinya masalah sudah terselesaikan, dan tread ini saya lock demi keamaan, :)
untuk TS kalau ada yang ingin ditanyakan lagi mengenai masalah ini silahkan tanya di CB atau pm saya/ staff lain nya untuk membuka tread ini kembali.
[ASK] Ada yang tau Script FOG? Empty2012-05-19, 18:15
PostRe: [ASK] Ada yang tau Script FOG?
#2
yade26 
Novice
Novice
yade26

Level 5
Posts : 132
Thanked : 0
Engine : RMVX Ace
Skill : Skilled
Type : Scripter

[ASK] Ada yang tau Script FOG? Vide
ini mungkin
Code:

#===============================================================
# ● [VX] ◦ Multiple Fog 1.0 ◦ □
#--------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released on: 01/03/2008
#--------------------------------------------------------------
=begin
----------------------------
● How to use fog
----------------------------
Call Script like this:
--------------------------
$fog.id = 1
$fog.name = "fog"
$fog.opacity = 60
$fog.blend = 0
$fog.ox = 0
$fog.oy = 0
$fog.zoom = 100
$fog.tone = [0,0,0,0]
$fog.show
---------------------------
● Description
---------------------------
$fog.id << ID of Fog (If you call fog on same ID, old fog with same ID will be delete)
$fog.name << Fog image file name (It has to be store in folder 'Pictures')
$fog.opacity << Opacity of fog (0 - 255)
$fog.blend << Blend Type of Fog (0: Normal, 1: Add, 2: Subtraction)
$fog.ox << Speed of fog move horizontally
$fog.oy << Speed of fog move vertically
$fog.zoom << Size of Fog (in %)
$fog.tone << Tone Color on Fog [Red, Green, Blue, Gray] put number 0 - 255 in it

$fog.show << USE THIS TO SHOW FOG WITH SETTING YOU JUST SET
(Last setting will be replace with default setting after show that fog)
-----------------------------
● Note
-----------------------------
- THIS IS NOT REAL FOG,so it doesn't has some option that XP has.
- You don't have to set all the options when calling new fog,
if those options are same as default setting.

-----------------------------
● Additional Methods
-----------------------------
These are what you can do with fog by call script :)

◦ Change Fog Opacity
$fog.opacity(fog id, opacity)

◦ Change Fog Blend Type
$fog.blend(fog id, blend type) # blend type >> (0: Normal, 1: Add, 2: Subtraction)

◦ Change Fog Move Speed
$fog.speed(fog id, ox, oy)

◦ Increase/Decrease Fog Move Speed
$fog.speed_plus(fog id, ox_addition, oy_addition)
# You can use negative number to decrease speed/change direction

◦ Change Fog Size
$fog.zoom(fog id, size) # Size is in %, e.g. type 100 for 100%

◦ Change Fog Tone
$fog.tone(fog id, tone) # Type tone like this >> [Red, Green, Blue, Gray]

◦ Delele Fog
$fog.delete(fog id)

◦ Delete All Fogs
$fog.clear

=end
#===============================================================

class Worale_Multiple_Fog
 
  Z_BASE = 200 # Z-Coordinate for Fog (Higher Z = Fog place above other objects)
  CLEAR_FOG = true # Clear all the fogs when teleport? (true/false)
  # You can call script to turn on/off this option by:
  # $game_system.clear_fog = (true/false)
 
  attr_accessor :name, :opacity, :blend, :ox, :oy, :id, :zoom, :tone
  def reset_fog
    #------------------------------------------------------------------------
    # ● Default Fog Setting
    # - This setup will be use if you don't set them in game before show fog
    # - This setup will replace last setup everytime after you show fog
    #------------------------------------------------------------------------
    @id = 0 # ID of Fog
    @name = "" # Leave it ""
    @opacity = 255 # Fog opacity (0 - 255)
    @blend = 0 # [0: Normal, 1: Add, 2: Subtraction]
    @ox = 0 # Speed to move fog horizontally
    @oy = 0 # Speed to move fog vertically
    @zoom = 100 # in %
    @tone = [0,0,0,0] # [Red, Green, Blue, Gray]
  end
 
  def initialize
    reset_fog
  end
 
  def find(id)
    for i in 0..$game_system.fog.size - 1
    next if $game_system.fog[i] == nil
    if $game_system.fog[i]["id"] == id
      return i
      break
    end
  end
  return nil
 end
 
  def opacity(id = 0,opacity = 255)
    return if id == 0
    id = find(id)
    if id != nil
    $game_system.fog[id]["opacity"] = opacity
    $game_system.fog_refresh = true
    end
  end
 
  def tone(id = 0,tone = [0,0,0,0])
    return if id == 0
    id = find(id)
    if id != nil
    $game_system.fog[id]["tone"] = tone
    $game_system.fog_refresh = true
    end
  end
 
  def zoom(id = 0,size = 100)
    return if id == 0
    id = find(id)
    if id != nil
    $game_system.fog[id]["zoom"] = (size / 100)
    $game_system.fog_refresh = true
    end
  end
 
  def blend(id = 0,blend = 0)
    return if id == 0
    id = find(id)
    if id != nil
    $game_system.fog[id]["blend"] = blend
    $game_system.fog_refresh = true
    end
  end
 
  def speed(id = 0, ox = 0, oy = 0)
    return if id == 0
    id = find(id)
    if id != nil
    $game_system.fog[id]["ox"] = ox
    $game_system.fog[id]["oy"] = oy
    $game_system.fog_refresh = true
    end
  end
 
  def speed_plus(id = 0, ox = 0, oy = 0)
    return if id == 0
    id = find(id)
    if id != nil
    $game_system.fog[id]["ox"] += ox
    $game_system.fog[id]["oy"] += oy
    $game_system.fog_refresh = true
    end
  end
 
  def delete(id = 0)
    return if id == 0
    id = find(id)
    if id != nil
    $game_system.fog.delete_at(id)
    $game_system.fog_refresh = true
    end
  end
 
  def show
    return if @id == 0 or @name == ""
    delete(@id)
    $game_system.fog.push ({"id" => @id, "name" => @name, "opacity" => @opacity, "blend" => @blend, "ox" => @ox, "oy" => @oy, "zoom" => (@zoom / 100), "tone" => @tone})
    $game_system.fog_refresh = true
    reset_fog
  end
 
  def clear
    $game_system.fog.clear
    $game_system.fog_refresh = true
  end
 
  #--------------------------------------
  $worale = {} if !$worale
  $worale["MutipleFog"] = true
  #--------------------------------------
  $fog = Worale_Multiple_Fog.new
  #=========================================
end

class Spriteset_Map
  alias wor_fog_sprmap_ini initialize
  alias wor_fog_sprmap_upd update
  alias wor_fog_sprmap_dis dispose
  def initialize
    create_fog
    wor_fog_sprmap_ini
  end
  def dispose
    dispose_fog
    wor_fog_sprmap_dis
  end
  def update
    update_fog
    wor_fog_sprmap_upd
  end

  def create_fog
    @fog_map = []
    @fog_oxoy = []
    return if $game_system.fog == [] or $game_system.fog == nil
    for i in 0..$game_system.fog.size - 1
      next if $game_system.fog[i] == nil
      id = $game_system.fog[i]["id"]
      @fog_map[id] = Plane.new(@viewport1)
      @fog_map[id].bitmap = Cache.picture($game_system.fog[i]["name"])
      @fog_map[id].opacity = $game_system.fog[i]["opacity"]
      @fog_map[id].blend_type = $game_system.fog[i]["blend"]
      @fog_map[id].zoom_x = @fog_map[id].zoom_y = $game_system.fog[i]["zoom"]
      @fog_map[id].tone = Tone.new($game_system.fog[i]["tone"][0],$game_system.fog[i]["tone"][1],$game_system.fog[i]["tone"][2])
      @fog_map[id].z = (id + Worale_Multiple_Fog::Z_BASE)
      @fog_oxoy[id] = [$game_system.fog[i]["ox"],$game_system.fog[i]["oy"]]
    end
  end
 
  def update_fog
    if $game_system.fog_refresh == true
      $game_system.fog_refresh = false
      dispose_fog
      create_fog
    end
    return if $game_system.fog == [] or $game_system.fog == nil
    return if @fog_map == [] or @fog_oxoy == []
    for i in 0..$game_system.fog.size - 1
      next if $game_system.fog[i] == nil
      id = $game_system.fog[i]["id"]
      return if @fog_map == [] or @fog_oxoy == []
      next if @fog_map[id].nil? or @fog_oxoy[id].nil?
      @fog_map[id].ox += @fog_oxoy[id][0]
      @fog_map[id].oy += @fog_oxoy[id][1]
    end
  end
 
  def dispose_fog
    return if @fog_mag == []
      for i in 0..@fog_map.size - 1
      next if @fog_map[i] == nil
        @fog_map[i].bitmap.dispose
        @fog_map[i].dispose
        @fog_map[i] = nil
        @fog_oxoy[i] = nil
      end
  end
end

class Game_System
  attr_accessor :fog, :fog_refresh, :clear_fog
  alias wor_fog_gamsys_ini initialize
  def initialize
    wor_fog_gamsys_ini
    @fog = Array.new
    @fog_refresh = false
    @clear_fog = Worale_Multiple_Fog::CLEAR_FOG
  end
end

class Window_Message < Window_Selectable
  alias wor_fog_winmes_ini initialize
  def initialize
    wor_fog_winmes_ini
    self.z += 200
  end
end

class Game_Interpreter
  alias wor_fog_gamint_201 command_201
  def command_201
  if $game_system.clear_fog
    if @params[0] == 0
      id_map = @params[1]
    else
      id_map = $game_variables[@params[1]]
    end
    $fog.clear if id_map != @map_id
  end
    wor_fog_gamint_201
  end
end
[ASK] Ada yang tau Script FOG? Empty2012-05-19, 18:18
PostRe: [ASK] Ada yang tau Script FOG?
#3
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

[ASK] Ada yang tau Script FOG? Vide
:doh:
Scriptnya adanya yang woratana sih :

Code:
#===============================================================
# ● [VX] ◦ Multiple Fogs ◦ □
# * Use unlimited layers of fog *
#--------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released on: 13/05/2008
# ◦ Version: 1.0
#--------------------------------------------------------------

#==================================================================
# ** HOW TO USE **
# * use event command 'Script...' for the any script line below~
#-----------------------------------------------------------------
#
#---------------------------------------------------------------
# ** SETUP FOG PROPERTIES & SHOW FOG **
# * You have to setup fog properties, before show fog~
#-------------------------------------------------------------
# * There are 3 ways to setup fog properties:
# >> Setup Fog [Custom]:
# $fog.name = 'image_name' # Image file name, must be in fog image path (setup path below).
# $fog.hue = (integer) # Fog's hue. 0 - 360, 0 for no hue.
# $fog.tone = [red, green, blue, gray] # Fog's tone color.
# $fog.opacity = (integer) # Fog's opacity. 0 - 255, you will not see fog in 0.
# $fog.blend = (0, 1, or 2) # Fog's blend type. 0 for Normal, 1 for Add, 2 for Subtract.
# $fog.zoom = (integer) # Fog's size (in %). 100 for normal size.
# $fog.sx = (+ or - integer) # Fog's horizontal move speed.
# $fog.sy = (+ or - integer) # Fog's vertical move speed.
#
# >> Setup Fog [From Preset]:
# (You can setup fog presets, in part FOG PRESET SETUP below)
# $fog.load_preset(preset_id)
#
# >> Setup Fog [From Fog that showing]:
# $fog.load_fog(fog_id)
#
#--------------------------------------------------------------
# ** SHOW FOG **
#-------------------------------------------------------------
# After setup the fog, show fog by call script:
# $fog.show(fog_id)
#
# In case you want to show new fog on same ox, oy, tone as old fog. Call Script:
# $fog.show(old_fog_id, false)
#
# * fog_id: the ID number you want to put this fog in.
# (It can be any positive number or zero)
#
# After you show fog, the fog properties you've set will replace with default setting.
# (You can setup default setting, in part FOG DEFAULT SETTING below)
#
#--------------------------------------------------------------
# ** DELETE FOG **
#-------------------------------------------------------------
# You can delete 1 or more fog(s) at a time by call script:
# $fog.delete(fog_id, fog_id, fog_id, ...)
#
#---------------------------------------------------------------
# ** OLD FOG CONTROL EVENT COMMANDS **
#-------------------------------------------------------------
# Change Fog Tone:
# $game_map.fogtone(fog_id, [red, green, blue, gray], duration)
# e.g. $game_map.fogtone(1, [100,200,-100,0], 10)

# Change Fog Opacity:
# $game_map.fogopac(fog_id, new_opacity, duration)
# e.g. $game_map.fogopac(2, 200, 10)
#
#---------------------------------------------------------------
# ** ADDITIONAL SETTINGS **
#-------------------------------------------------------------
# Change Fog Image's Path:
# $game_map.fog_path = 'image_path'
# e.g. $game_map.fog_path = 'Graphics/Pictures/'

# Turn ON/OFF [Automatically clear all fogs when transfer player]:
# $game_map.fog_reset = (true / false)
#
#===============================================================

#==================================================================
# START ** MULTIPLE FOG SETUP **
#==================================================================
class Game_Map
  alias wora_mulfog_gammap_ini initialize
  def initialize
    wora_mulfog_gammap_ini
   
    #==================================================================
    # ** MULTIPLE FOG SETUP ** SETTINGS
    #--------------------------------------------------------------
    @fog_path = 'Graphics/Pictures/'
    # Fog image's path
    @fog_reset = true # (true or false)
    # Automatically clear all multiple fogs when transfer player
    #==================================================================
   
    @mulfog_name = []
    @mulfog_hue = []
    @mulfog_opacity = []
    @mulfog_blend_type = []
    @mulfog_zoom = []
    @mulfog_sx = []
    @mulfog_sy = []
    @mulfog_ox = []
    @mulfog_oy = []
    @mulfog_tone = []
    @mulfog_tone_target = []
    @mulfog_tone_duration = []
    @mulfog_opacity_duration = []
    @mulfog_opacity_target = []
  end
end
class Wora_Multiple_Fog
  def set_default
    #==================================================================
    # ** MULTIPLE FOG SETUP ** FOG DEFAULT SETTING
    #--------------------------------------------------------------
    @name = ''
    @hue = 0
    @opacity = 64
    @blend = 0
    @zoom = 200
    @sx = 0
    @sy = 0
    @tone = [0,0,0,0]
    #==================================================================
  end
 
  def load_preset(preset_id)
    case preset_id
    #==================================================================
    # ** MULTIPLE FOG SETUP ** FOG PRESET SETUP
    #--------------------------------------------------------------
    when 1 # Preset ID 1
      @name = '001-Fog01'
      @hue = 0
      @tone = [100,-255,20,0]
      @opacity = 60
      @blend = 0
      @zoom = 200
      @sx = 10
      @sy = 0
    when 2 # Preset ID 2
      @name = '002-Clouds01'
      @hue = 0
      @tone = [0,0,0,0]
      @opacity = 200
      @blend = 1
      @zoom = 200
      @sx = -2
      @sy = -2
    #==================================================================
    end
  end
#==================================================================
# END ** MULTIPLE FOG SETUP **
# * Don't change anything below unless you know what you're doing.
#==================================================================

  attr_accessor :name, :hue, :opacity, :blend, :zoom, :sx, :sy, :tone
  def initialize
    set_default
  end
 
  def load_fog(id)
    @name = $game_map.mulfog_name[id].sub($game_map.fog_path, '')
    @hue = $game_map.mulfog_hue[id]
    @opacity = $game_map.mulfog_opacity[id]
    @blend = $game_map.mulfog_blend_type[id]
    @zoom = $game_map.mulfog_zoom[id]
    @sx = $game_map.mulfog_sx[id]
    @sy = $game_map.mulfog_sy[id]
    tn = $game_map.mulfog_tone[id]
    @tone = [tn.red, tn.blue, tn.green, tn.gray]
  end

  def show(id, reset_all = true)
    $game_map.mulfog_name[id] = $game_map.fog_path + @name
    $game_map.mulfog_hue[id] = @hue
    $game_map.mulfog_opacity[id] = @opacity
    $game_map.mulfog_blend_type[id] = @blend
    $game_map.mulfog_zoom[id] = @zoom
    $game_map.mulfog_sx[id] = @sx
    $game_map.mulfog_sy[id] = @sy
    $game_map.mulfog_tone[id] = Tone.new(@tone[0], @tone[1], @tone[2], @tone[3])
    if $game_map.mulfog_ox[id].nil? or reset_all
      $game_map.mulfog_ox[id] = 0
      $game_map.mulfog_oy[id] = 0
      $game_map.mulfog_tone_target[id] = Tone.new(0, 0, 0, 0)
      $game_map.mulfog_tone_duration[id] = 0
      $game_map.mulfog_opacity_duration[id] = 0
      $game_map.mulfog_opacity_target[id] = 0
    end
    set_default
  end
 
  def delete(*args)
    args.each do |id|
      $game_map.mulfog_name[id] = ''
    end
  end
end

class Game_Interpreter
  alias wora_mulfog_interpret_com201 command_201
  #--------------------------------------------------------------------------
  # * Transfer Player
  #--------------------------------------------------------------------------
  def command_201
    if $game_map.fog_reset
      if @params[0] == 0; id_map = @params[1]
      else; id_map = $game_variables[@params[1]]
      end
      $game_map.clear_mulfog if id_map != @map_id
    end
    wora_mulfog_interpret_com201
  end
end

class Game_Map
  attr_accessor :mulfog_name, :mulfog_hue, :mulfog_opacity, :mulfog_blend_type,
  :mulfog_zoom, :mulfog_sx, :mulfog_sy, :mulfog_ox, :mulfog_oy, :mulfog_tone,
  :mulfog_tone_target, :mulfog_tone_duration, :mulfog_opacity_duration,
  :mulfog_opacity_target, :fog_reset, :fog_path
 
  alias wora_mulfog_gammap_upd update
  def update
    wora_mulfog_gammap_upd
    @mulfog_name.each_index do |i|
      next if @mulfog_name[i].nil? or @mulfog_name[i] == ''
      # Manage fog scrolling
      @mulfog_ox[i] -= @mulfog_sx[i] / 8.0
      @mulfog_oy[i] -= @mulfog_sy[i] / 8.0
      # Manage change in fog color tone
      if @mulfog_tone_duration[i] >= 1
        d = @mulfog_tone_duration[i]
        target = @mulfog_tone_target[i]
        @mulfog_tone[i].red = (@mulfog_tone[i].red * (d - 1) + target.red) / d
        @mulfog_tone[i].green = (@mulfog_tone[i].green * (d - 1) + target.green) / d
        @mulfog_tone[i].blue = (@mulfog_tone[i].blue * (d - 1) + target.blue) / d
        @mulfog_tone[i].gray = (@mulfog_tone[i].gray * (d - 1) + target.gray) / d
        @mulfog_tone_duration[i] -= 1
      end
      # Manage change in fog opacity level
      if @mulfog_opacity_duration[i] >= 1
        d = @mulfog_opacity_duration[i]
        @mulfog_opacity[i] = (@mulfog_opacity[i] * (d - 1) + @mulfog_opacity_target[i]) / d
        @mulfog_opacity_duration[i] -= 1
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Start Changing Fog Color Tone
  #--------------------------------------------------------------------------
  def fogtone(i, tone, duration)
    duration = duration * 2
    tone = Tone.new(tone[0], tone[1], tone[2], tone[3])
    @mulfog_tone_target[i] = tone.clone
    @mulfog_tone_duration[i] = duration
    if @mulfog_tone_duration[i] == 0
      @mulfog_tone[i] = @mulfog_tone_target[i].clone
    end
  end
  #--------------------------------------------------------------------------
  # * Start Changing Fog Opacity Level
  #--------------------------------------------------------------------------
  def fogopac(i, opacity, duration)
    duration = duration * 2
    @mulfog_opacity_target[i] = opacity * 1.0
    @mulfog_opacity_duration[i] = duration
    if @mulfog_opacity_duration[i] == 0
      @mulfog_opacity[i] = @mulfog_opacity_target[i]
    end
  end
 
  def clear_mulfog
    @mulfog_name.each_index {|i| @mulfog_name[i] = '' }
  end
end
$worale = {} if !$worale
$worale['MutipleFog'] = true
$fog = Wora_Multiple_Fog.new
class Spriteset_Map
  alias wora_mulfog_sprmap_crepal create_parallax
  alias wora_mulfog_sprmap_updpal update_parallax
  alias wora_mulfog_sprmap_dispal dispose_parallax
 
  def create_parallax
    @mulfog = []
    @mulfog_name = []
    @mulfog_hue = []
    wora_mulfog_sprmap_crepal
  end
 
  def update_parallax
    wora_mulfog_sprmap_updpal
    $game_map.mulfog_name.each_index do |i|
      next if $game_map.mulfog_name[i].nil?
      # If fog is different than current fog
      if @mulfog_name[i] != $game_map.mulfog_name[i] or @mulfog_hue[i] != $game_map.mulfog_hue[i]
        @mulfog_name[i] = $game_map.mulfog_name[i]
        @mulfog_hue[i] = $game_map.mulfog_hue[i]
        if @mulfog[i].nil?
          @mulfog[i] = Plane.new(@viewport1)
          @mulfog[i].z = 3000
        end
        if @mulfog[i].bitmap != nil
          @mulfog[i].bitmap.dispose
          @mulfog[i].bitmap = nil
        end
        if @mulfog_name[i] != ''
          @mulfog[i].bitmap = Cache.load_bitmap('', @mulfog_name[i], @mulfog_hue[i])
        end
        Graphics.frame_reset
      end
      next if @mulfog[i].bitmap.nil?
      # Update fog plane
      @mulfog[i].zoom_x = ($game_map.mulfog_zoom[i] / 100.0) if @mulfog[i].zoom_x != ($game_map.mulfog_zoom[i] / 100.0)
      @mulfog[i].zoom_y = ($game_map.mulfog_zoom[i] / 100.0) if @mulfog[i].zoom_y != ($game_map.mulfog_zoom[i] / 100.0)
      @mulfog[i].opacity = $game_map.mulfog_opacity[i] if @mulfog[i].opacity != $game_map.mulfog_opacity[i]
      @mulfog[i].blend_type = $game_map.mulfog_blend_type[i] if @mulfog[i].blend_type != $game_map.mulfog_blend_type[i]
      @mulfog[i].ox = ($game_map.display_x / 8.0 + $game_map.mulfog_ox[i]) if @mulfog[i].ox != ($game_map.display_x / 8.0 + $game_map.mulfog_ox[i])
      @mulfog[i].oy = ($game_map.display_y / 8.0 + $game_map.mulfog_oy[i]) if @mulfog[i].oy != ($game_map.display_y / 8.0 + $game_map.mulfog_oy[i])
      @mulfog[i].tone = $game_map.mulfog_tone[i] if @mulfog[i].tone != $game_map.mulfog_tone[i]
    end
  end
 
  def dispose_parallax
    @mulfog.each_index do |i|
      next if @mulfog[i].nil?
      @mulfog[i].bitmap.dispose if !@mulfog[i].bitmap.nil?
      @mulfog[i].dispose
    end
    wora_mulfog_sprmap_dispal
  end
end
#==================================================================
# [END] VX Multiple Fog by Woratana [woratana@hotmail.com]
#==================================================================


Ini gambarnya :
https://2img.net/h/i1234.photobucket.com/albums/ff413/marjoni01/001-Fog01.png
https://2img.net/h/i1234.photobucket.com/albums/ff413/marjoni01/002-Clouds01.png
https://2img.net/h/i1234.photobucket.com/albums/ff413/marjoni01/003-Shade01.png
https://2img.net/h/i1234.photobucket.com/albums/ff413/marjoni01/004-Shade02.png
https://2img.net/h/i1234.photobucket.com/albums/ff413/marjoni01/005-Sandstorm01.png

Sorry kalau salah :sembah:
[ASK] Ada yang tau Script FOG? Empty2012-05-19, 18:23
PostRe: [ASK] Ada yang tau Script FOG?
#4
yade26 
Novice
Novice
yade26

Level 5
Posts : 132
Thanked : 0
Engine : RMVX Ace
Skill : Skilled
Type : Scripter

[ASK] Ada yang tau Script FOG? Vide
@marjon : kasih tau cara makenya....
Buat Event > di Bag. page 3 paling bawah pilih Script...
masukan script seperti ini :
Code:

$fog.id = 1
$fog.name = "002-Clouds01"
$fog.opacity = 60
$fog.blend = 0
$fog.ox = 0
$fog.oy = 0
$fog.zoom = 100
$fog.tone = [0,0,0,0]
$fog.show

nah, itu scriptnya tinggal diubah sesuka kmu inchy =w=b
[ASK] Ada yang tau Script FOG? Empty2012-05-19, 18:26
PostRe: [ASK] Ada yang tau Script FOG?
#5
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

[ASK] Ada yang tau Script FOG? Vide
@yade
Sebenernya dulu pernah gue jelasin ke seseorang gitu :doh:
And bukannya di instruction ada ya? :lol:
Jadi gue kira udh paham :kabur:
But, well practice makes thing perfect =w=b
Anyway, Over and out :kabur:
[ASK] Ada yang tau Script FOG? Empty2012-05-19, 18:33
PostRe: [ASK] Ada yang tau Script FOG?
#6
yade26 
Novice
Novice
yade26

Level 5
Posts : 132
Thanked : 0
Engine : RMVX Ace
Skill : Skilled
Type : Scripter

[ASK] Ada yang tau Script FOG? Vide
ada yg lain lagi nih scriptnya...
Code:

#====================================================================#
#  #*****************#          Fog effect V1.0 Falcao script      #
#  #*** By Falcao ***#          Allow fog effects graphics on map  #
#  #*****************#                                              #
#        RMVX                  Instalation: Copy and paste the    # 
# makerpalace.forumotion.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

cara memanggil arwahnya cuma buat event > script...
masukkan script ini
Code:

$game_map.fog("Fog Name", Opacity, Zoom , Scroll_x, Scroll_y)
contohnya :
$game_map.fog("002-Clouds01",50,2,1,1)

silahkan dipilih scriptnya...
[ASK] Ada yang tau Script FOG? Empty2012-05-20, 08:15
PostRe: [ASK] Ada yang tau Script FOG?
#7
inchy 
Newbie
Newbie
inchy

Level 5
Posts : 78
Thanked : 0
Engine : RMVX
Skill : Beginner
Type : Spriter

[ASK] Ada yang tau Script FOG? Vide
Masukin gambar nya di mna ya ?? ( gambar awan nya)
[ASK] Ada yang tau Script FOG? Empty2012-05-20, 08:16
PostRe: [ASK] Ada yang tau Script FOG?
#8
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

[ASK] Ada yang tau Script FOG? Vide
Kalau untuk script woratana
Masukinnya di Graphics / Picture
Terus untuk yang dikasih yade sama kayaknya :lol:
[ASK] Ada yang tau Script FOG? Empty
PostRe: [ASK] Ada yang tau Script FOG?
#9
Sponsored content 




[ASK] Ada yang tau Script FOG? Vide
 

[ASK] Ada yang tau Script FOG?

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Engines :: RMVX :: RMVX Archive-