Okay so I am making an item that calls upon a new scene which shows a big picture of the world map. Already have that, but then I want to make another picture (prefferably an icon) that will act like a cursor. What I want to do is be able to press or hold the UP, DOWN, LEFT, RIGHT arrow keys to be able to move the cursor around.
This is the current script I use:
def refresh
self.contents.clear
bitmap = RPG::Cache.panorama('001-Sky01', 0)
src_rect =
Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap, src_rect, 255)
player = RPG::Cache.character('001-Fighter01', 0)
player_src_rect =
Rect.new(0, 0, player.width / 4, player.height / 4)
player_x = 0
player_y = 0
case $game_
map.namewhen 'MAP_NAME' then player_x = 100 and player_y = 100
end
self.contents.blt(player_x, player_y, player, player_src_rect, 255)
end
The first part shows the panorama as the map. The second part shows the character sprite. Depending on what map you are on, the character sprite's coordinates change. So I'm planing on making another image just like the ones in that script which will use a cursor instead. Does anyone know how to move an image upon pressing arrow keys?