Hey People!
I made an itemmenu but I got a problem~
the menu is super slow..
Let me explain it a bit further:
I have an array that holds wether you got the item or not.
then I make a list which only contains the items you got.
for example:
Array 01 (Items):
(0 you do not have the item | 1 You got the item)
01 - HP Potion - 1
02 - ... - 0
03 - ... - 0
04 - Bracelet - 1
05 - ... - 0
06 - Weapon01 - 1
// ... and so on
with a while loop I write those values in another array
// ...
var loop = 0;
var loop2 = 0;
while(loop < 30 )
{
if(items[loop][available] == 1)
{
itemlist[loop2] = items[loop][id];
loop2 += 1;
}
loop1 += 1;
wait(1);
}
//...
// now i got an arraylist that would be like this
01 - HP Potion
04 - Bracelet
06 - Weapon01
//...
The next thing i do is writing the first 8 items into 8 placeholder via a while loop
If the list is bigger than 8 items and i scroll down in the menu it ought to show the 2nd to 9th item, 3rd to 10th, 4th to 11th... etc. until i reach the end of the list. I do this with a jump variable that adds the scrolldown amount to the while loop which fills the placeholders.
it works fine for me though, but when i reach the 8th placeholder and i push down "s" for scroll down further it lasts 2-3 seconds until he shows the 2nd to 9th item. thats much too slow.
i hope someone has a better idea to solve this problem!
thanks in advance
Roxas