Converting string/integer to tone

Jono99

Veteran
Veteran
Joined
May 8, 2015
Messages
76
Reaction score
17
First Language
English
Primarily Uses
RMVXA
I'm working on a function where the player can make enter a set of values to form a window colour. As it is, I've gotten it to the point where the characters are formatted correctly, all I have to do is convert the string into a tone but I don't know how to do that. I know var.to_i is convert to integer and var.to_s is convert to string but from experience, var.to_t isn't convert to tone. What is it? Please help. Thanks.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Tone is an object that has 4 parts - red, green, blue and alpha.


You would need 3 or 4 variables (4 if you want alpha).


Tone.new($game_variables[1], $game_variables[2], $game_variables[3], $game_variables[4])
 
Last edited by a moderator:

Jono99

Veteran
Veteran
Joined
May 8, 2015
Messages
76
Reaction score
17
First Language
English
Primarily Uses
RMVXA
Tone is an object that has 4 parts - red, green, blue and alpha.


You would need 3 or 4 variables (4 if you want alpha).


Tone.new($game_variables[1], $game_variables[2], $game_variables[3], $game_variables[4])
I feel so horrible only seeing this now after figuring it out on my own, but thank you.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top