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.

[SOLVED]Get pixel's color?

Ares

Member

I need to obtain the color of a certain pixel on the map, but how?
I couldn't find anything in the help file, so can anybody help me with this?
In the bitmap class there is a get_pixel(x,y) method, but I need to obtain the color of a pixel on the map(which isn't a bitmap...)

EDIT:: I work in RMXP
 

Ares

Member

berka":3p9c5yy2 said:
if you use rmvx you can snap a bitmap from the map.
in xp, you have to find the tile's id. Then you'll be able to retrieve the bitmap of the Tilemap class.

berka

Yeah I use XP (sorry for not-mentioning :P)

What I want to do is as following:
I use a shrinked viewport (black edges above and beneath).
I want to color those edges with a color from the map (à la the philips ambilight TV's). I think I could make it work if I only knew how to get a color from a specific tile.

P.S. I think recoloring those edges every step will cause immense lag, so I plan on recoloring them say... every fifteen seconds?
 

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