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.

RGSS2: Is there a way to zoom in the tilesets (map)??...

I got a couple of questions...

1. Is there a way to zoom in the tilesets (map)??...
2. How is the proper way to change a tileset? (for one of my own, for example)
3.How can I display numbers in scene_map like it happens in scene_battle (like when hitted,for example)?

Thank you
 
Okay, for number two you would have to either press F10 on your keyboard or click the Game tab on the toolbar and click on the Resource Manager. From there you click "Import", find the desired file. Last but not least, if another window pops up like this

http://img241.imageshack.us/img241/4000/54963182xw4.png[/img]

then click on the background to make it transparent.Or else there will be boxes around your tile. Click OK to finish the deal. You can manage your resources by going back to the Resource Manager. Easy, right? :thumb:

3. I'm still not clear on what you want to accomplish. Do you want a Heads-Up display that displays the hp or sp? Or are you using an Action Battle System where you want the damage to be displayed near the character?
 
First of all: thank you very much.

Thank you for #2, now that is resolved.

About #3, yes Im am making an CBS and I wan to display damage near character.

Thank you again
 
On 2 you need to right click on the shadow (the one under the bridges) to make it semi-transparent, otherwise all the shadows will look weird.

And 3, if you look at the RMVX battle system they don't display damage that way so I just copied it from RMXP and then edited a little.
you can use it on any sprite (like an event or the player)
Code:
some_sprite.damage(dmg, crit, newY)
dmg is the damage that should be displayed (i.e 54)
crit is if it also should write "CRITICAL". (i.e true/false)
and than the part that I added, the newY is so you can make it being drawn on a different y axis (sprite_y-newY), you then make it draw once every frame but add 1 to newY every frame so it looks like it's going up.

Code:
class Sprite
  def damage(value, critical, y)
    dispose_damage
    if value.is_a?(Numeric)
      damage_string = value.abs.to_s
    else
      damage_string = value.to_s
    end
    bitmap = Bitmap.new(160, 48)
    bitmap.font.name = "Arial Black"
    bitmap.font.size = 32
    bitmap.font.color.set(0, 0, 0)
    bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
    bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
    bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
    bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
    if value.is_a?(Numeric) and value < 0
      bitmap.font.color.set(176, 255, 144)
    else
      bitmap.font.color.set(255, 255, 255)
    end
    bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
    if critical
      bitmap.font.size = 20
      bitmap.font.color.set(0, 0, 0)
      bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
      bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
      bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
      bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
      bitmap.font.color.set(255, 255, 255)
      bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
    end
    @_damage_sprite = ::Sprite.new(self.viewport)
    @_damage_sprite.bitmap = bitmap
    @_damage_sprite.ox = 80
    @_damage_sprite.oy = 20
    @_damage_sprite.x = self.x
    @_damage_sprite.y = (self.y - self.oy / 2) - y
    @_damage_sprite.z = 3000
    @_damage_duration = 40
  end
  def dispose_damage
    if @_damage_sprite != nil
      @_damage_sprite.bitmap.dispose
      @_damage_sprite.dispose
      @_damage_sprite = nil
      @_damage_duration = 0
    end
  end
end

Hope it helps :thumb:
 

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