[RESOLVED]Convert rgss to rgss3

Started by kreiss, June 18, 2022, 10:17:50 am

Previous topic - Next topic

kreiss

June 18, 2022, 10:17:50 am Last Edit: June 18, 2022, 01:38:04 pm by kreiss
Hi everyone.

I tried to convert my rmxp script to rmvxace, but I have a error from Game_Interpreter. (I'm beginner)



The script allow to flip picture.

class Game_Picture
  attr_reader  :mirror
 
  alias mirror_initialize initialize
  def initialize(number)
    mirror_initialize(number)
    @mirror ||= false
  end

  def mirror=(bool)
    @mirror = bool
  end
end # class Game_Picture

class Sprite_Picture
    alias mirror_update update
    def update
      mirror_update
      self.mirror = @picture.mirror
    end
end # class Sprite_Picture

class Game_Interpreter
    def mirror_picture(id, bool)
      $game_screen.pictures[id].mirror = bool
    end
end # class Game_Interpreter

Thanks for help !

EDIT : I resolved my problem, omg I'm so dumb...

I just replace "$game_screen.pictures" by "screen.pictures".

KK20

Yep, that's one of the changes VXA made from XP: Game_Screen no longer has a global instance saved in $game_screen. It's instead instantiated as an instance variable in Game_Troop and Game_Map, allowing you to have separate screen effects in battle and on the map, rather than having to modify $game_screen each time you jump from the map scene to battle and back.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!