Main Menu
  • Welcome to The RPG Maker Resource Kit.

Image in Menu instead of Character Sprite (Help)

Started by Zulen, September 04, 2006, 07:05:56 AM

0 Members and 1 Guest are viewing this topic.

Zulen

A good while ago, a friend of mine had a script for his game. It was just like Dubleax/Slipknot's Advanced Messege System, only he somehow got images into the menu screen, in place of his character sprites.

I'd rather have an image of the person there, instead of a character sprite.

He doesn't remember how he did it, my friend, but he said to check on Crankeye.

So...is it a special script I need to get images into the menu, or is it a command that comes with Dubleax/Slipknot's AMS?


Tsunokiette

#1
Quote from: Zulen on September 04, 2006, 07:05:56 AM
A good while ago, a friend of mine had a script for his game. It was just like Dubleax/Slipknot's Advanced Messege System, only he somehow got images into the menu screen, in place of his character sprites.

I'd rather have an image of the person there, instead of a character sprite.

He doesn't remember how he did it, my friend, but he said to check on Crankeye.

So...is it a special script I need to get images into the menu, or is it a command that comes with Dubleax/Slipknot's AMS?



This is how you add faces, edit this to your liking.

First you create a method to load the bitmap in RPG::Cache -

module RPG
      module Cache
            def faces(filename)
                  path = "Graphics/Faces/"
                  return load_bitmap(path,filename)
            end
      end
end


Now go into Window_Base and add this -

      def draw_actor_face(actor,x,y)
            bitmap = RPG::Cache.faces(actor.name)
            rect = Rect.new(x, y, bitmap.width, bitmap.height)
            self.contents.blt(rect,bitmap)
      end


Then in the window you want to draw a face just type -

draw_actor_face(actor, x, y)

In the refresh method with all of the other drawing methods.

Actor should already be defined so you can leave it as is, and the x and y are the coordinates you want the face to be.

This may or may not work, this is from the top of my head.

EDIT: I forgot to mention that you need to create a Faces folder in the Graphics folder and place all your faces there, making the filenames the same as the character's name.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."