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.

Zoom_x and Zoom_Y Trouble

Status
Not open for further replies.

Tdata

Sponsor

I'm attempting to zoom in on one of my character's sprites, but everytime i try to use zoom_x or zoom_y i get an NameError for them.

the code i'm using is a copy of the draw_actor_graphic method of Window_Base. I get the feeling that it is due to RPG::Cache making it a bitmap. Is there a way to mke it into a sprite?
 
I think it's something like this:
Code:
bitmap = RPG::Cache.character('name', 0)
contents.stretch_blt(Rect.new(0, 0, bitmap.width, bitmap.height), bitmap, Rect.new(0, 0, Bitmap.width * 3, Bitmap.height * 3))
 

Tdata

Sponsor

I get 'Undefined method 'width' for Bitmap::class'*
Fixed that error^

It is weird, but your code makes it smaller instead of bigger...
http://anifan.org/ex.PNG[/img]
the red circle is hwat your code produces the gree is what the default draw_actor_graphic method produces...

Fixed it by dividing by 4. Thank you for your help...
 
This topic has been resolved. If Tdata or any other users have any questions or further problems regarding this topic, please create a new thread about them.

Thank you!
 
Status
Not open for further replies.

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