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.

A few questions about sprite and map properties

Ok so far I am working on a game in rmxp and its pretty easy to figure out what I mean but I just wont quite give away its purpose yet -.- anyways I did a edit to line 51 of the sprite character script and this is what I did

Code:
         self.zoom_x = 8
        self.zoom_y = 8
And i will like to know how I will get it to make sprites look 8 times as big when they are the lowest to the screen and when they are the highest they should be about 2. I tried making
self.zoom_x = @character.screen_y*(-1)/10
so that it would appear bigger the less the screen y was but it stayed the same size no matter what. I would like some help to making the zoom greater when it is closer to the bottom -.-. Also I would like to know how I can make the tilest zoom. i tried to add in line 119 a
@tilemap.zoom_x = 8
but it says it wasnt recognized :(
one other thing and thats I want it so when my characters are zoomed that if you touch them even at the upper half where it doesnt regist them to be, that it will register them. Normally it just registers 1 square where their feet is to be where they are, therefore they can easily overlap each other and its messy. thanks for any help :)
 
If you want the character to appear a size based on the distance across the screen.. try:
self.zoom_x = (@character.screen_y * 0.2).to_f
self.zoom_y = (@character.screen_y * 0.2).to_f
 

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