6
66Gramms
Guest
Hello!
So i'm making a level select screen where will be 90 levels but always 30 of them on display... (actually there are 30 instances) So i make the instances in a cycle and there i do it like this:
So this way i have levels from 1 to 30 lined up perfectly. but when i want to "change page" in the game i actually just want to change the instances' level variable by +1/-1
to do this all the instances should have different id. I know it could be done with an array but they told me there is a better way to do that. can you please help me about how to give all of them a different id and not all of them are going to be "instance" without using arrays?
if i don't do this just type like obj_level_select.level++ then all the instances will change to the same value (2) then increase together. Thanks in advance
So i'm making a level select screen where will be 90 levels but always 30 of them on display... (actually there are 30 instances) So i make the instances in a cycle and there i do it like this:
Code:
instance = instance_create(x, y, obj_level_select);
instance.level += rise //Level is a variable inside the object that is used to display the lvl number
rise++;
to do this all the instances should have different id. I know it could be done with an array but they told me there is a better way to do that. can you please help me about how to give all of them a different id and not all of them are going to be "instance" without using arrays?
if i don't do this just type like obj_level_select.level++ then all the instances will change to the same value (2) then increase together. Thanks in advance
Attachments
-
319.5 KB Views: 5
-
293.9 KB Views: 4