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

[Resolved] Modern Algebra's Fix Picture to Map problem

Started by rofl1337, June 16, 2011, 12:36:58 PM

0 Members and 1 Guest are viewing this topic.

rofl1337

Script found here: http://rmrk.net/index.php/topic,39052.0.html
When I set the FPM_SWITCH to 1 and the FPM_Z_VARIABLE to 2, "above character" events still appear below the picture.
What am I doing wrong?
Also, the comments in the script say, that there are two switches, that must be opperated, but I can only see the FPM_SWITCH.
sincerly

exhydra

#1
Did you set the priority of the event as 'Above Character'? That is necessary for it to be above the image.

EDIT : Oop, eating lunch and reading posts isn't good ... missed that part about that you did change the priority. However, I just tried putting an 'Above Character' event over top of an image and it worked just fine. Are you setting the FPM_SWITCH to true? Or just '1'.

UPDATED 05-29-14


IS YOUR PROJECT OPTIMIZED?
UPDATED 07/04/15 - v2.5

RPG MAKER TOOLBOX
UPDATED 07/04/15 - v1.5

rofl1337

#2

"Above Character" Events are displayed below the coasthouse_below.png.

The variable and the switch are properly assigned.
Does anyone know, what is up with this Picture_Layer_Switch, talked about here: http://rmrk.net/index.php/topic,39049.0.html?

rofl1337

Bump
I searched for a conflicting script, but neither moving the script to the top, nor to the bottom of my script list changed a thing.

modern algebra

If you upload a project with the error reproduced, I will take a look.

rofl1337

Uploaded. I hope it's some obvious noob mistake, thats easy to fix.

modern algebra

Hmm, well try going down to line 84 and changing:



      when 2 then 200


to:


      when 2 then 199

exhydra

#7
I got it to work on mine by adding in a return after line 124. I don't think it breaks anything ... ?


   if @picture.map_locked
      self.ox, self.oy = $game_map.display_x / 8, $game_map.display_y / 8
      return
    end


The Z was getting overwritten (or something) after I stepped past a certain point on the map. Looks like when the map is larger than 17x13 squares, if you step too far away from the displayed image, it loses its Z order and then gets it back after you step within range again.

I shifted everything up to the far upper-left corner of the map to test, because I found that the Above Character functioned the closer it was to that point.

Weird stuff ...



EDIT : Oh, could it be that the picture Z was conflicting with Game_Character > screen_z (line 261)? Both the event and the picture would be set at a z of 200. If I change the z listed within screen_z to 201, the event remains above the picture at all times (when variable is set to '2').

So I guess the proper fix would be to drop '200' within the script to '199', then?

  #--------------------------------------------------------------------------
  # * Get Screen Z-Coordinates
  #--------------------------------------------------------------------------
  def screen_z
    if @priority_type == 2
      return 200
    elsif @priority_type == 0
      return 60
    elsif @tile_id > 0
      pass = $game_map.passages[@tile_id]
      if pass & 0x10 == 0x10    # [?]
        return 160
      else
        return 40
      end
    else
      return 100
    end
  end

UPDATED 05-29-14


IS YOUR PROJECT OPTIMIZED?
UPDATED 07/04/15 - v2.5

RPG MAKER TOOLBOX
UPDATED 07/04/15 - v1.5

rofl1337

changed it to 199, worked.
Was this a common issue, or just a one I encountered?
Anyway, whats up with this third switch you talked about, Modern Algebra?
Did you remove it?

modern algebra

Yeah, the third switch doesn't exist anymore. Just ignore it.

As far as I know, this is the only time I ever received a complaint about that, but I would have to assume that it is a common problem.