Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[New Question!] Draw Images

Okay, I'm going to try and explain this as well as I can...

I'm doing an edit of a character selection script. It uses all of these complicated effects and such that I don't need. There is a switch case in the Scene that I need to use to display an actor graphic depending the index of my command window:

case @command_window.index
when 0
#Draw Actor 1's graphic
when 1
#Draw Actor 2's graphic
....

And so forth. I've been looking at other methods in Window_Base and such... but I don't understand enough about RGSS to know how to manipulate them to put the image where I want it.

Does anyone know what I mean and how to help...? I can't use any methods from Window_Base or whatever because this is a Scene class... as far as i know...

EDIT: In fact, learning how to draw any image at a specific point would help a lot...
 

Jason

Awesome Bro

Hmm, well I guess there's two things you could try here, I don't know which one to use in this instance, since I use them for two different windows;

You could try the simple;
Code:
 

draw_actor_graphic(@actor, x, y)

 

Or you could try this;
Code:
 

bp_actor = RPG::Cache.character(actor.character_name,actor.character_hue)

r_actor = Rect.new(0, 0, bp_actor.width / 4, bp_actor.height / 4)

self.contents.blt(x, y, bp_actor, r_actor)

 

Now, I don't know what the difference is, only that if I try using the first one, and it doesn't work, the second one does, lol....

*Is still pretty much a rookie at scripting...*

Although, I've just thought, your title says battler, this only displays the graphic, lol.
 
Yeah... Do you know how to just print a picture at a certain point? I know the whole RPG::Cache.picture("picture name", something) thing, but I don't know what that second parameter is, not do I know how to draw the picture at a certain point on a bitmap...
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top