Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
phionabrie

Can a tile have multiple priorities?

Question

Is there a way assign two different priorities to the same tile, applicable in different circumstances?  I want to have some items (rope ladders and walkways for instance) that the character can go under/behind but then go around and climb/walk on top of.

 

I know I could just make two identical maps, one with one priority set and the other with the other priority set, but I'm hoping there's a solution that doesn't require zoning.

Edited by phionabrie

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hey there. I'm pretty sure you can accomplish this by accessing the database, changing the maximum number of tilesets to allow for TWO more instead of one, then using the same image in both the new tilesets and creating separate priorities for each of them, although they will be the same graphic. This is if you want to use them for separate maps, though.

 

If you want to put multiple priorities for the same objects on one map, just select the desired object and copy and paste at the bottom of the same image. Be careful when doing this, though, because RMXP works with 32X32 squares, which is how you'll map things. You don't want any of your objects to get cut off, seem too big, or be stuck in the wrong positions.

 

Hope this helped. :)

Share this post


Link to post
Share on other sites
  • 0

I'm not sure what GermanyXItaly1000 meant, but you can just edit the tileset so it has duplicates of some of the tiles. (e.g 2 identical ladder tiles on one tileset)

RMXP doesn't have the option to use 2 tilesets on one map, and it is actually much simpler than he/she made it sound (or at least, it sounded complicated to me)

 

Programs that can make custom grids on the image that aren't part of the image are great for editing tilesets. I personally prefer GraphicsGale as it can have the cursor snap to your custom grid (the grid would be 32x32 of course, in this case) http://www.humanbalance.net/gale/us/

Share this post


Link to post
Share on other sites
  • 0

I use photoshop for my editing, and have been working on several custom tilesets already, so having two graphics of the same image is no problem.  What I'm not sure of though is how to go about switching the tiles on the map so that I don't have to have the player zone/transfer.  If I use events to place the tiles, will the priority tags still apply?

Share this post


Link to post
Share on other sites
  • 0

If I understand what you are wanting correctly, I think I can help you with a script I wrote for another user.  This would be more of a workaround than a multi-priority tile like you were requesting, but I think it could get you the effect you want, albeit with a little clunkier execution than priorities.

 

Script for movement restriction (edited for left and right restriction

 

#global method for ease of initiation
def restrict
  $game_temp.movement_restricted = true
end
#global method for ease of termination
def unrestrict
  $game_temp.movement_restricted = false
end

# Modifies Game_Temp to hold the restrict_movement variable
class Game_Temp
  
  attr_accessor :movement_restricted
  
  alias old_initialize initialize
  
  def initialize
    
    old_initialize
    
    @movement_restricted = false
    
  end

end

class Game_Character
  #--------------------------------------------------------------------------
  # * Move Left
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_left(turn_enabled = true)
    if $game_temp.movement_restricted == false
      # Turn left
      if turn_enabled
        turn_left
      end
      # If passable
      if passable?(@x, @y, 4)
        # Turn left
        turn_left
        # Update coordinates
        @x -= 1
        # Increase steps
        increase_steps
      # If impassable
      else
        # Determine if touch event is triggered
        check_event_trigger_touch(@x-1, @y)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Move Right
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_right(turn_enabled = true)
    if $game_temp.movement_restricted == false
      # Turn right
      if turn_enabled
        turn_right
      end
      # If passable
      if passable?(@x, @y, 6)
        # Turn right
        turn_right
        # Update coordinates
        @x += 1
        # Increase steps
        increase_steps
      # If impassable
      else
        # Determine if touch event is triggered
        check_event_trigger_touch(@x+1, @y)
      end
    end
  end
end 

 

 

 

Place this script above main in the script editor.

 

The steps to making it functional:

 

  1. Create a common event
  2. Set conditional branch looking for a switch (001, or whichever number you desire
  3. Under false, add three commands:

               Add set move route command: ALWAYS ON TOP ON

               Add script command restrict_movement

               Add switch operation to turn ON the condition switch

 

     4.  Under true, add three commands:

 

               Add set move route command: ALWAYS ON TOP OFF

               Add script command unrestrict_movement

               Add switch operation to turn OFF the condition switch

 

     5.  Anytime you want the player to climb, use an on touch event which is under the player (on the first high priority tile).

     6.  Set a condition for the player's direction face (at the bottom, facing up; at the top, facing down)

     7.  Call the common event

     8.  Tweak these steps as needed (you may need to force the character to take the final step down or up depending on the way you set up the rope)

 

The first difficulty I foresee with this setup is dismounting the rope.  It may take some modification to get the process smooth, but I think at least this approach can give you what you want.

Edited by Hodgeelmf

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...