Floating message with value from variable

LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
81
Reaction score
8
First Language
Polish
Primarily Uses
Hi I know that when I put in evet script 

Code:
"message = "Hello"$game_map.show_text($game_player,message)
 

I will get shown a message "Hello" near my player. But is there a way of changing it's color ? or even puting a variable amount in this ?
Im trying to put message with number from variable but I got problem... Im nooob in Ruby... just begging.. anyone know how I should write it ?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
if using those lines, you should be able to use all text codes that are available in the show text event command (haven't tested, but should be obvious).


So open the event command and hower the mouse over the input window to read those codes, then include them in your message string.


EDIT: Typo
 
Last edited by a moderator:

LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
81
Reaction score
8
First Language
Polish
Primarily Uses
I think I wrote wrong ... I just want to show "jumping text" with number taken from variable. I will attach the file.

gamevariables.jpg

variable.png
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
I think I wrote wrong ... I just want to show "jumping text" with number taken from variable. I will attach the file.
Yes, you made it wrong - you need to use the text codes from the event command "show text", not the ruby variable code itself.
The text codes have nothing to do with ruby code - that's why I said you have to check the hint overlay given by the show text command in the event editor - for example, the text code \N[1] will display the name of the first actor, but that code is NOT a ruby code.


Just go to the editor, open an event window, double click on the content and select the "show text" command (the first command in the entire list) and then hover over the text input window to see the full list of text codes and select the codes you need for your work.
 

LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
81
Reaction score
8
First Language
Polish
Primarily Uses
Ok, I did as You wrote...but there is problem, I need this message to show jumping after char pick up gold from floor. I don;t need a message because it will pause the game and so on. 

When I opened the "show text" option there was a code "\V[n]" which shows the number of the stored variable but... when I put this code to

my script message call:

 message = "$\V[551]"$game_map.show_text($game_player,message)ormessage = "\V[551]"

$game_map.show_text($game_player,message)

it's doesnt show me the number of variable but a message : \V[551] ...
any sugestion  ?

variable2.jpg

textcommand.jpg
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
then you probably need one of the advanced messaging system scripts to enable that display.


There are several of those on the master script list (Yanfly's and Modern Algebra's and perhaps others), so you have to check which one is compatible to your other scripts.
 

LynX

Veteran
Veteran
Joined
Jan 6, 2014
Messages
81
Reaction score
8
First Language
Polish
Primarily Uses
Thank You Andar for all Your help and time :) . I will check their scripts
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top