RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Picture tone e dimension

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 81
localhost
Guys, you know what string I use to change the color and size to an image in RGSS?

**
Rep: +0/-0Level 81
localhost
Nothing? =(

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, I don't know why you are using the word string - string is a term of art in scripting, and it refers to a particular type of object. But you wouldn't be able to change anything with it unless you use the eval method. You also haven't specified what kind of objecy you're dealing with. So, I'm a little deterred from responding to this topic for fear that you don't have enough knowledge that I can respond to this without explaining every detail. Here goes anyway:

Assuming you are using a Bitmap, you can use the hue_change method to change the hue:

Code: [Select]
<bitmap object>.hue_change (0-360)

So, something like this, if you were referring to the bitmap in a window:

Code: [Select]
self.contents.hue_change (24)

To change the size, I'm assuming you mean stretch or shrink it. To do this, you would redraw it onto another bitmap and use the stretch_blt method. So if <bitmap 1> is the one you want to enlarge, you would do the following:

Code: [Select]
new_size = Rect.new (0, 0, width, height)
<bitmap 2>.stretch_blt (new_size, <bitmap 1>, <bitmap 1>.rect)


If, on the other hand, you are dealing with Sprite objects, you would change the tone with the following method:

Code: [Select]
<sprite>.tone = Tone.new (red, green, blue, gray)

to change the color to be blended with it:

Code: [Select]
<sprite>.color = Color.new (red, green, blue, alpha)

To change the size, you could use the code:

Code: [Select]
<sprite>.zoom_x = float
<sprite>.zoom_y = float

where float simply means a decimal number. 1.0 = 100%, 1.5 = 150%, etc...

Again, <sprite> is a Sprite object - it's the object you want to operate on, so I assume you know what it is.

**
Rep: +0/-0Level 81
localhost
I understood everything perfectly!
I was a little vague in the post and I have not specified anything,sorry ^^'
Thank you for your reply =)

***
Rep:
Level 75
This could be useful for me too.
I have to write it down.
Thanks MA (: