ID:165962
 
How would you go about making boxes pop up and display a dialog, using a sprite, like in most games? I'm talking about like in Maple Story, Legend Of Zelda, Mario, ect. A custom done box comes up and the text is slowly added to it, or a play can press a button to make it come up all at once. I'm assuming I'd need to use overlays in some manner.
In response to Dragon_fire6653
Dont suggest a crappy demo please, cause i doubt he can understand that.
In response to National Guardsmen
Your absolutely right..... The tutorial didnt explain anything..... I was understanding most of it during my glance until i saw...
mob/proc
close_menu(){for(var/obj/text/O in client.screen)del O;for(var/obj/back/O in client.screen)del O}
TOSP(var/textonscreen){text1=list();for(var/a=1,a<=length(textonscreen),a++){text1+=copytext(textonscreen,a,a+1)}}
textonscreenbackground(var/XC1,YC1,XC2,YC2)
for(var/XC=XC1,XC<=XC2,XC++)
for(var/YC=YC1,YC<=YC2,YC++){var/obj/back/b=new(client);
if(XC==XC1)b.icon_state="l";if(XC==XC2)b.icon_state="r";if(YC==YC1)b.icon_state="b";
if(YC==YC2)b.icon_state="t";if(XC==XC1&&YC==YC1)b.icon_state="ll";
if(XC==XC2&&YC==YC2)b.icon_state="ur";if(XC==XC1&&YC==YC2)b.icon_state="ul";
if(XC==XC2&&YC==YC1)b.icon_state="lr";b.screen_loc="[XC],[YC]"}
textonscreenTEXT(var/XC1,XC2,YC1,YC2,T)
var{XC=XC1;YC=YC1}TOSP(T)
for(var/Y in text1){var/obj/text/C=new(client);
if(XC==round(XC)&&YC==round(YC)) C.screen_loc="[XC],[YC]";else if(XC!=round(XC)&&YC==round(YC))C.screen_loc="[XC-0.5]:16,[YC]";else if(XC==round(XC)&&YC!=round(YC))C.screen_loc="[XC],[YC-0.5]:+16";
else if(XC!=round(XC)&&YC!=round(YC))C.screen_loc="[XC-0.5]:16,[YC-0.5]:+16";C.icon_state="[Y]";
sleep(1) // Important. If you wish for the text to sleep leave it, otherwise remove sleep(1)!
XC+=0.5
if(XC==XC2)
XC=XC1;YC-=0.5
if(YC==YC2-0.5)break}


anything simplier?
In response to FriesOfDoom
ummm.....anyone?