Dr_Nomz
Member
I'm trying to make a dynamic text system where the script below will display a certain line of text based on what's in the list and what position it's in.
But to make it work right i need to have it somehow know the height of the previous string, based on what the last list entry is. Any ideas?
But to make it work right i need to have it somehow know the height of the previous string, based on what the last list entry is. Any ideas?
Code:
for(var test1 = 0; test1 < ds_list_size(global.quest_update_TEST); test1++){
test_str[test1] = string_height_ext(ds_list_find_value(global.quest_update_TEST,test1),20,474);
//Use the find_value function to see if the list has a certain value
//ANYWHERE in the list, and if so, it'll display it.
if ds_list_find_value(global.quest_update_TEST,test1) == "ez"{
draw_text_outline(xx+188,yy+162+(test1*number)+test_str[test1],
"It works REALLY well. :D asfasdfs gfas ggs a sf af sdasd fda ",
2,c_black,4,20,474);
}
if ds_list_find_value(global.quest_update_TEST,test1) == "yes"{
draw_text_outline(xx+188,yy+162+(test1*number)+test_str[test1],
"It works. dddddddddddddddddddddddddddddddddddddddd",
2,c_black,4,20,474);
}
if ds_list_find_value(global.quest_update_TEST,test1) == "hi"{
draw_text_outline(xx+188,yy+162+(test1*number)+test_str[test1],
"YESSSSSSSSSSSS ssssssssssssssssssssssssssssssssssssssssssss",
2,c_black,4,20,474);
}
}