brotherRML
Member
Hi,
I started editing a simple textbox for the dialogues between PG and PNG. to avoid having to write code for each dialogue I wanted to use the variable management in the room editor.
but I can't get it to work. am I wrong or is there a bug? the door management between one room and another works
here code of textbox object
and in mobile PNG
thanks for aids
I started editing a simple textbox for the dialogues between PG and PNG. to avoid having to write code for each dialogue I wanted to use the variable management in the room editor.
but I can't get it to work. am I wrong or is there a bug? the door management between one room and another works
here code of textbox object
GML:
if testo_dialogo == ""
{
testo_dialogo = "proprietario "+string(proprietario);
}
step event
//show_debug_message("proprietario "+string(proprietario.id));
if keyboard_check_pressed(vk_backspace)//aalora a funzionare funziona, il problema è che non ho una keyboard sul telefono
{
if (pag+1 < array_length_1d(testo_dialogo))
pag +=1; //quindi farò con l'event del tap da cellulare
else
instance_destroy();
}
draw event
draw_sprite(s_box_dialogo,0, ascissaBox, ordinataBox);
draw_text_ext(ascissaBox+5,ordinataBox-altezzaBox, testo_dialogo[pag], altezzaTesto, larghezzaBox);
Code:
step event
#region sequenza dialoghi
if box_dialogo == noone
{
box_dialogo = instance_create_layer(x,y,"tile_sovrapposto", o_box_dialogo);
box_dialogo.proprietario = instance_nearest(x,y,o_PeasantMobile);
box_dialogo.testo_dialogo = dialogo;
// show_debug_message("props"+string(box_dialogo.proprietario));
}
//crea_box_dialogo(o_box_dialogo, self, other);
#endregion
if not place_meeting(x,y, o_PlayerMobile)
{
staDialogando = false;
instance_destroy(box_dialogo);
box_dialogo = noone;
statoazione = azione.alpasso;
sprite_index = SpriteAttesa;
image_index = 0;
}
#endregion
create event
box_dialogo = noone;
dialoghi_lunghi = false;
staDialogando = false;
dialogo[0] ="";//if i write something here it shows it correctly
dialogo[1] ="";//if i write something here it shows it correctly
dialogo[2] ="";//if i write something here it shows it correctly
dialogo[3] ="";//if i write something here it shows it correctly