Jump to content

idleberry

Member
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0

About idleberry

  • Rank
    Newbie
  1. there is no space, it is just an appearance... I have no idea when and why it happened - there are no spaces in the original I have already resolved the issue on another forum ... there was a person who could give a more or less normal answer ^^ we are trying to refer to the internal variable of the class, respectively, in the description of the class, you need to add references to the call: in class Spriteset_Map attr_reader: viewport1 in class Scene_Map attr_reader: spriteset after which the script works. $game_variables [30] = nil $game_variables [30] = Sprite.new (SceneManager.scene.spriteset.viewport1) # $game_variables [30] .viewport = SceneManager.scene.spriteset.viewport1 $game_variables [30] .bitmap = Bitmap.new (544,416) $game_variables [30] .bitmap.fill_rect (0, 0, 544, 416, Color.new (255,0,0,255)) # $game_variables [30] .z = 0 $game_variables [30] .x = 0 $game_variables [30] .y = 0 original:
  2. I am trying to display a picture on the screen via a short script from an event, but I am faced with a depth problem. I need to display a picture between the tiles and the character. I'm not a programmer and I can't get my question answered anywhere... I replaced in scripts in class Spriteset_Map @ viewport1 = Viewport.new by $ viewport1 = Viewport.new (throughout the class, respectively). then, calling a script from an event: $ game_variables [30] = nil $ game_variables [30] = Sprite.new ($ viewport1) $ game_variables [30] .bitmap = Bitmap.new (544,416) $ game_variables [30] .bitmap.fill_rect (0, 0, 544, 416, Color.new (255,0,0,255)) # $ game_variables [30] .z = 0 $ game_variables [30] .x = 0 $ game_variables [30] .y = 0 it drew the picture between the tiles and the character. from here I can conclude that direct access to the @ viewport1 variable does not work and it is necessary to access the variable in a different way. but I have no idea how. I hope that there is at least someone who will tell me a solution.
×
Top ArrowTop Arrow Highlighted