Creating a new graphics folder
If you're anything like me, your pictures folder will be full of junk by now. Well, with this tutorial you can create a new folder to store them in!
First, open the game folder, and go to \Graphics.
Right click > New folder. Rename this folder to anything you want. For this example I will call it "Faces".
Now go to the script editor, and create a new blank entry.
We are going to use Module RPG::Cache for this, as this is what the game uses to access such folders. The game already has some built-in, but to add more we must do it ourselves.
Now, to call such images, we just need to put the filename as "RPG::Cache.faces('filename')" as we would normally do with the image folders in the game maker already.
So to change a sprite's bitmap to that of the face "arshes.png" we would do the following:
You don't need to add the .png, but I find it helps in case you have the same filename used for different file types (i.e. JPG).
If you're anything like me, your pictures folder will be full of junk by now. Well, with this tutorial you can create a new folder to store them in!
First, open the game folder, and go to \Graphics.
Right click > New folder. Rename this folder to anything you want. For this example I will call it "Faces".
Now go to the script editor, and create a new blank entry.
We are going to use Module RPG::Cache for this, as this is what the game uses to access such folders. The game already has some built-in, but to add more we must do it ourselves.
Code:
module RPG
module Cache
def self.faces(filename)
self.load_bitmap("Graphics/Faces/", filename)
end
end
end
Now, to call such images, we just need to put the filename as "RPG::Cache.faces('filename')" as we would normally do with the image folders in the game maker already.
So to change a sprite's bitmap to that of the face "arshes.png" we would do the following:
Code:
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.faces("arshes.png")
You don't need to add the .png, but I find it helps in case you have the same filename used for different file types (i.e. JPG).