Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: Ranquil on January 17, 2014, 09:46:52 am

Title: [XP] Mode7 Crash
Post by: Ranquil on January 17, 2014, 09:46:52 am
Yo.
If I'm using the Mode7 script (http://forum.chaos-project.com/index.php/topic,691.0.html) and I start testplay with the player starting position on a map that has no set Mode7 parameters, the game will, after selecting a new game, crash and throw the following error message:

QuoteScript 'Spriteset_Map' line 117: NoMethodError occurred.

undefined method `ox=' for #<Tilemap_mode7:0x3c982b0>


I browsed through the comments in the topic and a few people had the same problem as well. Too bad no one answered them.
Any idea what's causing this and how to solve it?
Title: Re: [XP] Mode7 Crash
Post by: Ranquil on January 23, 2014, 05:37:54 am
I like bumping.
Title: Re: [XP] Mode7 Crash
Post by: AliveDrive on January 23, 2014, 11:24:31 am
I'm using the Neo Mode 7 script with the "+" add-on, and I'm having no issues.

Neo Mode 7 (http://save-point.org/thread-3084.html)
Title: Re: [XP] Mode7 Crash
Post by: KK20 on January 24, 2014, 08:33:30 pm
In the Spriteset_Map#initialize method in the script, you need to move init_options up more so that it looks like this

  #--------------------------------------------------------------------------
  # * Initialize Object
  #   Rewritten to call a map with mode7
  #--------------------------------------------------------------------------
  alias initialize_mode7_spriteset_map initialize
  def initialize
    init_options
    if !$game_system.mode7
      initialize_mode7_spriteset_map
      return
    end
#... rest of the code

Reason: $game_system.mode7 = false only when init_options is called. When going from a Mode-7 map to a normal one, $game_system.mode7 was still true, and would skip the original aliased method, building the tilemap with the Mode-7 rewrite and, on the first frame of updating the spriteset, error out.