How to draw text on screen?

IsFutureBright

Lightning Bolt Action
Veteran
Joined
Dec 26, 2012
Messages
120
Reaction score
11
First Language
Portuguese
Primarily Uses
Is there any simple way to draw text on position x,y?
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
You need to make a sprite, give it a bitmap, and then use the bitmap's draw_text method. This is more difficult than just slapping it in a script box, because after a little bit Ruby will consider your sprite and bitmap to be garbage and have it deleted. You'd have to make a script in the script editor that holds it in order for Rubt to not deem it as removable junk.

It really isnt that difficult, but it may be a little tricky getting it to work exactly as you'd like it to.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Sprite is an option.


Transparent window is also an option.


There are many ways but yes you basically need something that stores a bitmap object.
 

IsFutureBright

Lightning Bolt Action
Veteran
Joined
Dec 26, 2012
Messages
120
Reaction score
11
First Language
Portuguese
Primarily Uses
I'm trying to do something like show a text on top of my door event saying "Z to Open" stuff like that. How would I go about ?
 

Gorou Fujita

Villager
Member
Joined
Jun 23, 2013
Messages
13
Reaction score
0
First Language
English
Primarily Uses
I see this is in the scripting section, but I noticed this thread from the "recent topics" on the front page of the forum. I apologize in advance if you absolutely want to do this with a script.

If you only want to draw text on your maps, and hopefully infrequently, you could simply go into photoshop, type out your message on a transparent layer, then save that as a tiny .png file. Then, simply use the "show picture" command centered with coordinates slightly above your door, in the example you gave.

I've created entire functional menus using the show picture command and some clever loops and conditionals, so something like an on-screen tutorial should be super easy to do with just events.

If you want the picture to disappear after the player opens the door, put the "show picture" command inside a conditional branch that checks if a switch is on, and then turn that switch on when you "open" the door.

Again, I don't know anything about scripting and I realize this is the scripting section, but I thought this would be easy enough with the built-in event commands.
 

IsFutureBright

Lightning Bolt Action
Veteran
Joined
Dec 26, 2012
Messages
120
Reaction score
11
First Language
Portuguese
Primarily Uses
I see this is in the scripting section, but I noticed this thread from the "recent topics" on the front page of the forum. I apologize in advance if you absolutely want to do this with a script.

If you only want to draw text on your maps, and hopefully infrequently, you could simply go into photoshop, type out your message on a transparent layer, then save that as a tiny .png file. Then, simply use the "show picture" command centered with coordinates slightly above your door, in the example you gave.

I've created entire functional menus using the show picture command and some clever loops and conditionals, so something like an on-screen tutorial should be super easy to do with just events.

If you want the picture to disappear after the player opens the door, put the "show picture" command inside a conditional branch that checks if a switch is on, and then turn that switch on when you "open" the door.

Again, I don't know anything about scripting and I realize this is the scripting section, but I thought this would be easy enough with the built-in event commands.
That's cool and all but I don't wanna have to make images all over the place when the engine already supports text drawing. It can be ok at first but I think that it might become too troublesome later on to keep it organized.

I like some of the scripts there but the one you sent me show the text all the time. I wanna be able to to control when it shows and where it shows. I'm currently using this one here: http://theolized.blogspot.com.br/2013/07/theo-interact-hover-notification.html but only shows the text if the event has a on click trigger. I wanted a hassle free way without having to need too many events just to show some interaction text. Something like:

comment <textVisible: true>comment <textValue: Z to open>Isn't there a way I could store this at game_event so that each game event had a text thingie that I could set it's values when needed?
 

Napoleon

Veteran
Veteran
Joined
Dec 29, 2012
Messages
869
Reaction score
97
First Language
Dutch
Primarily Uses
You could use mog's script and add a conditional to it (by active event page or self switch perhaps). But yeah you need to know how to script that and that is not entirely 'newbie-friendly' to do so. My minimap also only draws the icon on the map if the comment is on the ACTIVE event page. The code is all there you just need to combine it. But again, this is not an easy task for a beginner and I don't know exactly what your skill level is.
 

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,847
Messages
1,016,968
Members
137,561
Latest member
JaCrispy85
Top