XP - STATIC PARALLAX SCRIPT?

Posts

Pages: 1
So I've been experimenting with the H-Mode7 script, but one problem I'm having is the parallax background moving. I'm not exactly a scripter. I was looking around for a while for any parallax locking scripts for XP, but the only ones I can find are for VX and VXAce. I've also checked the list of XP scripts on this site, and can't find one there either. Does anyone know of a parallax locking script for XP, or if they could write one if possible? All help is appreciated.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Funny, I was pretty sure the problem with panoramas in RMXP was that they didn't move.

Well, here's a script to give you all the control you want over panoramas. If you want them to not move, just set the vertical and horizontal speeds to 0.

#_________________________________________________
# MOG_Scroll Panorama V1.3            
#_________________________________________________
# By Moghunter  
# [url]http://www.atelier-rgss.com[/url]
#_________________________________________________
# Horizontal and vertical movement of panoramas.
# Fade Mode and Random Mode.
# Panoramas repeat endlessly.
#_________________________________________________
module MOG
  
#ID of the variable that defines the horizontal speed.
#Set the variable to the desired speed, in pixels per frame.
#Set the variable positive to move right, negative to move left, 0 to stop.
VARIABLE_X_SPEED = 30 #VARIABLE ID
#ID of the variable that defines the vertical speed.  Same as horizontal.
VARIABLE_Y_SPEED = 31 #VARIABLE ID

#ID of the switch that activates Fade Mode.
FADE_MODE_SWITCH= 8 #SWITCH ID
#Fade speed.
FADE_SPEED = 3

#ID of the switch that activates Random Mode.
#Panorama will move in random directions when this switch is true.
RANDOM_MODE_SWITCH = 9  #SWITCH ID 
#Number of seconds which the panorama moves in one direction before switching,
# while in random mode.
RANDOM_PAN_DURATION = 2  #(in seconds)

end
$mogscript = {} if $mogscript == nil
$mogscript["scroll_panorama"] = true

############
# Game_Map #
############
class Game_Map
  attr_reader   :pan_ox                  
  attr_reader   :pan_oy 
  attr_accessor :panorama_opacity
  
  alias mog10_setup setup  
  def setup(map_id)
    @pan_ox = 0
    @pan_oy = 0   
    @opa_loop = 0
    @pan_rand_scroll_x = 0
    @pan_rand_scroll_y = 0
    @rand_time_x = 0
    @rand_time_y = 0
    @panorama_opacity = 0
    mog10_setup(map_id)
  end
  
  alias mog10_update update
  def update
    if $game_switches[MOG::FADE_MODE_SWITCH] == true
      if @opa_loop == 0
        @panorama_opacity -= MOG::FADE_SPEED
      elsif @opa_loop == 1
        @panorama_opacity += MOG::FADE_SPEED 
      end
      if @panorama_opacity < 1
        @opa_loop = 1
      elsif @panorama_opacity > 254
        @opa_loop = 0  
      end
    else
      @panorama_opacity = 255 
    end
    if $game_switches[MOG::RANDOM_MODE_SWITCH] == true 
      @rand_time_x += 1
      @rand_time_y += 1
      if @rand_time_x > 40 * MOG::RANDOM_PAN_DURATION
        @rand_time_x = 0
        case rand(2)
        when 0
          @pan_rand_scroll_x = 0 
        when 1
          @pan_rand_scroll_x = 1
        end
      end
      if @rand_time_y > 40 * MOG::RANDOM_PAN_DURATION
        @rand_time_y = 0
        case rand(2)
        when 0
          @pan_rand_scroll_y = 0 
        when 1
          @pan_rand_scroll_y = 1 
        end
      end
      if @pan_rand_scroll_x == 0 
        @pan_ox -= pan_x_speed
      else 
        @pan_ox += pan_x_speed
      end 
      if @pan_rand_scroll_y == 0 
        @pan_oy -= pan_y_speed
      else @pan_rand_scroll_y == 1
        @pan_oy += pan_y_speed
      end
    else
      @pan_ox -= pan_x_speed
      @pan_oy -= pan_y_speed
    end
    mog10_update
  end
end

#################
# Spriteset_Map #
#################
class Spriteset_Map
  alias mog10_map_update update
  def update
    mog10_map_update
    @panorama.ox = $game_map.display_x / 8 + $game_map.pan_ox
    @panorama.oy = $game_map.display_y / 8 + $game_map.pan_oy
    @panorama.opacity = $game_map.panorama_opacity
  end  
end


If you are using Atoa's Chrono Trigger Battle System, I have a version that works with that. It requires some extra work because the panorama has to continue during battle. Just let me know.
Thanks a bunch! I'll give it a go.
Pages: 1