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.name
when '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? :huh:
Why don't you just use events?
the map item goes to a new scene and if i use events then the picture only shows on the main screen (where the player moves around on)
i'm not talking about the map the player moves around on. i am talking about an item that shows the world map
Why don't you just show the picture of the map with an event instead?
http://forum.chaos-project.com/index.php/topic,57.0.html (http://forum.chaos-project.com/index.php/topic,57.0.html)
You should take a look at the RGSS Graphics for N00bs.
There are 4 chapters and the first couple talk about moving sprites around the screen.
Maybe they will help if your insistent on using scripts versus events :P
--J
wow thankyou! that's EXACTLY what i needed!