- Joined
- Apr 5, 2014
- Messages
- 16
- Reaction score
- 0
- First Language
- English
- Primarily Uses
I just got Soulpour777 Battle Fogs script and in trying to test it I'm having trouble turning it on. Here is the script:
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# RGSS3 - Battle Fogs# Version 1.0# Author: Soulpour777# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Description:# This script allows battle fogs / mist during battle, which is fully # controlled by the script user, thus making different fogs called before # the battle starts.# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Instructions:# Place the script below Materials above Main.#------------------------------------------------------------------------------# Usage:# To set if you would like to use a battle fog on battle, do this script call:# $game_system.set_allowfog(true)# set it to false if you don't want to. By the default, it is set to false.# To set the name of the fog you will use, do this script call:# $game_system.set_fogname(fognamex)# where fognamex is the name of the fog you're using. Example:# $game_system.set_fogname("001-Fog01")# By default, it is set to "" which means nothing.#------------------------------------------------------------------------------module Soulpour module BattleFog # How visible is the fog? BattleFog_Opacity = 120 # What is the surface of the fog? Fog_SurfaceZ = 2 endend#==============================================================================# ** Game_System#------------------------------------------------------------------------------# This class handles system data. It saves the disable state of saving and # menus. Instances of this class are referenced by $game_system.#==============================================================================class Game_System #-------------------------------------------------------------------------- # Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :allow_battlefog attr_accessor :fog_name #-------------------------------------------------------------------------- # Alias Listings #-------------------------------------------------------------------------- alias :battle_fog_system_initialize :initialize #-------------------------------------------------------------------------- # Object Initialization (Aliased) #-------------------------------------------------------------------------- def initialize battle_fog_system_initialize @allow_battlefog = false @fog_name = "" end #-------------------------------------------------------------------------- # Set Fog Name #-------------------------------------------------------------------------- def set_fogname(fognamex) @fog_name = fognamex end #-------------------------------------------------------------------------- # Allow Fog? #-------------------------------------------------------------------------- def set_allowfog(args) @allow_battlefog = args endend#==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------# This class performs battle screen processing.#==============================================================================class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- alias :battle_fog_initialize :start alias :battle_fog_update_basic :update_basic alias :battle_fog_terminate :terminate #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start battle_fog_initialize create_battle_fog if $game_system.allow_battlefog end #-------------------------------------------------------------------------- # * Create Fog #-------------------------------------------------------------------------- def create_battle_fog @battle_fog = Plane.new @battle_fog.bitmap = Cache.picture($game_system.fog_name) @battle_fog.opacity = Soulpour::BattleFog::BattleFog_Opacity @battle_fog.z = Soulpour::BattleFog::Fog_SurfaceZ end #-------------------------------------------------------------------------- # * Update Fog #-------------------------------------------------------------------------- def update_battle_fog @battle_fog.ox += 2 end #-------------------------------------------------------------------------- # * Dispose Fog #-------------------------------------------------------------------------- def dispose_fog @battle_fog.bitmap.dispose @battle_fog.dispose end #-------------------------------------------------------------------------- # * Update Frame (Basic) #-------------------------------------------------------------------------- def update_basic battle_fog_update_basic update_battle_fog if $game_system.allow_battlefog end #-------------------------------------------------------------------------- # * Terminate #-------------------------------------------------------------------------- def terminate battle_fog_terminate dispose_fog if $game_system.allow_battlefog end endI set up a switch called BattleFog, and I want it to turn on when I turn that switch on and go off when I turn the switch off. I tried testing this by inserting a Condition for the switch in the Battle Event portion under Troops in the Database that had this code in it:
$game_system.set_allowfog(true)$game_system.set_fogname(CloudySky1)I was trying to test it using a default RTP image, that's CloudySky1. I'm probably missing something really simple, I just got back into RPG Maker and haven't used anything since VX at it's release ><
Oh, here is the error I get when I turn it on:
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# RGSS3 - Battle Fogs# Version 1.0# Author: Soulpour777# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Description:# This script allows battle fogs / mist during battle, which is fully # controlled by the script user, thus making different fogs called before # the battle starts.# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Instructions:# Place the script below Materials above Main.#------------------------------------------------------------------------------# Usage:# To set if you would like to use a battle fog on battle, do this script call:# $game_system.set_allowfog(true)# set it to false if you don't want to. By the default, it is set to false.# To set the name of the fog you will use, do this script call:# $game_system.set_fogname(fognamex)# where fognamex is the name of the fog you're using. Example:# $game_system.set_fogname("001-Fog01")# By default, it is set to "" which means nothing.#------------------------------------------------------------------------------module Soulpour module BattleFog # How visible is the fog? BattleFog_Opacity = 120 # What is the surface of the fog? Fog_SurfaceZ = 2 endend#==============================================================================# ** Game_System#------------------------------------------------------------------------------# This class handles system data. It saves the disable state of saving and # menus. Instances of this class are referenced by $game_system.#==============================================================================class Game_System #-------------------------------------------------------------------------- # Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :allow_battlefog attr_accessor :fog_name #-------------------------------------------------------------------------- # Alias Listings #-------------------------------------------------------------------------- alias :battle_fog_system_initialize :initialize #-------------------------------------------------------------------------- # Object Initialization (Aliased) #-------------------------------------------------------------------------- def initialize battle_fog_system_initialize @allow_battlefog = false @fog_name = "" end #-------------------------------------------------------------------------- # Set Fog Name #-------------------------------------------------------------------------- def set_fogname(fognamex) @fog_name = fognamex end #-------------------------------------------------------------------------- # Allow Fog? #-------------------------------------------------------------------------- def set_allowfog(args) @allow_battlefog = args endend#==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------# This class performs battle screen processing.#==============================================================================class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- alias :battle_fog_initialize :start alias :battle_fog_update_basic :update_basic alias :battle_fog_terminate :terminate #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start battle_fog_initialize create_battle_fog if $game_system.allow_battlefog end #-------------------------------------------------------------------------- # * Create Fog #-------------------------------------------------------------------------- def create_battle_fog @battle_fog = Plane.new @battle_fog.bitmap = Cache.picture($game_system.fog_name) @battle_fog.opacity = Soulpour::BattleFog::BattleFog_Opacity @battle_fog.z = Soulpour::BattleFog::Fog_SurfaceZ end #-------------------------------------------------------------------------- # * Update Fog #-------------------------------------------------------------------------- def update_battle_fog @battle_fog.ox += 2 end #-------------------------------------------------------------------------- # * Dispose Fog #-------------------------------------------------------------------------- def dispose_fog @battle_fog.bitmap.dispose @battle_fog.dispose end #-------------------------------------------------------------------------- # * Update Frame (Basic) #-------------------------------------------------------------------------- def update_basic battle_fog_update_basic update_battle_fog if $game_system.allow_battlefog end #-------------------------------------------------------------------------- # * Terminate #-------------------------------------------------------------------------- def terminate battle_fog_terminate dispose_fog if $game_system.allow_battlefog end endI set up a switch called BattleFog, and I want it to turn on when I turn that switch on and go off when I turn the switch off. I tried testing this by inserting a Condition for the switch in the Battle Event portion under Troops in the Database that had this code in it:
$game_system.set_allowfog(true)$game_system.set_fogname(CloudySky1)I was trying to test it using a default RTP image, that's CloudySky1. I'm probably missing something really simple, I just got back into RPG Maker and haven't used anything since VX at it's release ><
Oh, here is the error I get when I turn it on:
I realize from this that it's not recognizing my input, but I don't know why.Script 'Game_Interpreter' line 1411: NameError occurred.
uninitialized constant Game_Interpreter::CloudySky1

