I'm working with a menu that displays achievements like blizzard's but in order to keep things simple and not get into more trouble trying to make a scroll bar i have static dialogs and the data inside them changes.
The way i do things with these now works but it's not efficient, i have a variable that tracks the "scroll" the button on the right adds or substracts a number and another trigger changes the data inside them
These are the triggers that i use but i need to do that for each achievement box plus once for every numeric value on the "pages"
I need a way to make it simpler but i don't know exactly how given i use values on a bank to first check if the player has certain achievement.
This is a really old screenshot from when it had some achievements earned, i had to delete the bank to test some new things.
I'd do achievements with a Record (or a list of variables), and run them through a loop. You should be able to use what you have now, and instead of performing a check for each individual achievement, do it all at once.
A rough example:
For loop from 1-achievement count
if achievment earned = true
modify string + " " + "1"
else
modify string + " " + "0"
Then your bank will save a list of 1 and 0 into a string, and you can save it as a single key. 1 for achievements unlocked, 0 for not.
When you load your bank:
For loop from 1-achivment count
if word (loop) = 1 then
set all dialog stuff[loop index]
This will greatly reduce your effort.
Not knowing how you do pages, i assume you just re-set dialog item images and stuff; so you could do something like,
For loop from (pagecount*5+1) to (pagecount*5+5)
if word (loop) = 1 then
set all dialog stuff[loop index]
Consider having each page as an independent frame, and show and hide on demand. Since it will onyl do all the image assignment and stuff once, it should be less taxing.
I'm working with a menu that displays achievements like blizzard's but in order to keep things simple and not get into more trouble trying to make a scroll bar i have static dialogs and the data inside them changes.
The way i do things with these now works but it's not efficient, i have a variable that tracks the "scroll" the button on the right adds or substracts a number and another trigger changes the data inside them
These are the triggers that i use but i need to do that for each achievement box plus once for every numeric value on the "pages"
I need a way to make it simpler but i don't know exactly how given i use values on a bank to first check if the player has certain achievement.
This is a really old screenshot from when it had some achievements earned, i had to delete the bank to test some new things.
I'd do achievements with a Record (or a list of variables), and run them through a loop. You should be able to use what you have now, and instead of performing a check for each individual achievement, do it all at once.
A rough example:
For loop from 1-achievement count
if achievment earned = true
modify string + " " + "1"
else
modify string + " " + "0"
Then your bank will save a list of 1 and 0 into a string, and you can save it as a single key. 1 for achievements unlocked, 0 for not.
When you load your bank:
For loop from 1-achivment count
if word (loop) = 1 then
set all dialog stuff[loop index]
This will greatly reduce your effort.
Not knowing how you do pages, i assume you just re-set dialog item images and stuff; so you could do something like,
For loop from (pagecount*5+1) to (pagecount*5+5)
if word (loop) = 1 then
set all dialog stuff[loop index]
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
Consider having each page as an independent frame, and show and hide on demand. Since it will onyl do all the image assignment and stuff once, it should be less taxing.
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!