S
srchaos
Guest
Hi there, i'm searching a textbox system with text only and simple transition, how i can do this?
I give you an example of how I would like it to be
I give you an example of how I would like it to be
I am an illustrator forced to learn to program and it's a long wayCan't help you, but gotta say that your game look absolutely stunning!
Thank youYour art is beautiful. Drenathor has a pretty decent dialog tutorial that is pretty easy to modify once you get the idea.
Create event of the obj :
box_message = "blablablabla there, use # for new lines"
box_www = 100 //width of your box
box_hhh = 50 //height of your box
box_bgcolor = c_white
box_bgcolor_alpha = 0.5
box_ftcolor = c_gray
box_ftcolor_alpha=0.85
box_offsetx = 15
box_offsety = -50
box_x1 = x + box_offsetx
box_y1 = y + box_offsety
box_x2 = box_x1 + box_www
box_y2 = box_y2 + box_hhh
box_range = 50
box_message_x1 = box_x1 + 10
box_message_y1 = box_y1 + 10
draw event of obj :
var dis = distance_to_object(obj_player)
if( dis <= box_range)
{
draw_set_alpha(box_bgcolor_alpha)
draw_set_color(bgcolor)
draw_rectangle(box_x1,box_y1,box_x2,box_y2, false) //try true for last argument
draw_set_alpha(box_ftcolor_alpha)
draw_set_color(ftcolor)
draw_text(box_message_x1,box_message_y1,box_message)
}
As a dev i think it's harder to learn how to make arts (sprites,animations,etc) than code ...at least for me
If you didnot learn from tuto tell us, we could still help (depending of what you want)
If you want a text to pop near an object in the room you could use something like this
something like this at start will show the message if the obj_player is near your object.Code:Create event of the obj : box_message = "blablablabla there, use # for new lines" box_www = 100 //width of your box box_hhh = 50 //height of your box box_bgcolor = c_white box_bgcolor_alpha = 0.5 box_ftcolor = c_gray box_ftcolor_alpha=0.85 box_offsetx = 15 box_offsety = -50 box_x1 = x + box_offsetx box_y1 = y + box_offsety box_x2 = box_x1 + box_www box_y2 = box_y2 + box_hhh box_range = 50 box_message_x1 = box_x1 + 10 box_message_y1 = box_y1 + 10 draw event of obj : var dis = distance_to_object(obj_player) if( dis <= box_range) { draw_set_alpha(box_bgcolor_alpha) draw_set_color(bgcolor) draw_rectangle(box_x1,box_y1,box_x2,box_y2, false) //try true for last argument draw_set_alpha(box_ftcolor_alpha) draw_set_color(ftcolor) draw_text(box_message_x1,box_message_y1,box_message) }
If you do not want to copy this code in each of your object you could use parenting... but it might no be possible everywhere.
So there is another method, create an obj_message when needed and this object will die after some time.