RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Moving a picture with RGSS3

Started by termina, May 30, 2012, 07:16:53 PM

0 Members and 1 Guest are viewing this topic.

termina

Hello there!

Having RMVXAce, I'm trying to re-write my Picture Menu script (that worked in RMXP) for this new version.
Basically, when calling the menu, a picture is supposed to appear by moving towards the middle of the screen.

However, RGSS3 apparently has a problem with picture displacement: it displays them only at the final co-ordinates, no matter how large is the variable containing the duration of the movement, you can't see their motion at all! :o


Here's my script for pic motion in RGSS3:

Quoteclass Game_Picture
attr_reader :duration         # in order to read the variable of movement duration from anywhere.
end

class Img_Test
  attr_accessor :spriteset
 
def initialize
   # @wait = 200
    @img = Game_Picture.new(z)
    @img = $game_map.screen.pictures[z]
    @img.show("picture name", origin, x, y, zoom_x, zoom_y, op, blend_type)
    SceneManager.scene.spriteset.update    #to update display
   
 
    @img.move(origin, x, y, zoom_x, zoom_y, op, blend_type, duration)
    SceneManager.scene.spriteset.update
    print @img.duration
    loop do
      @img.update
      SceneManager.scene.spriteset.update
       if @img.duration <= 0
         break
       end
     end
     SceneManager.scene.spriteset.update
   
  end
 
  end

    In RGGS1 (which my script perfectly works with),  $game_map.screen.pictures[z] and SceneManager.scene.spriteset.update must respectively be changed into $game_screen.pictures[z] and
$scene.spriteset.update ......
   
Has anyone a idea to help me out?