I HAVE something functional, but I feel like there must be a better way than how I'm doing it.
Here's an example of one of my messy solutions for choosing between events to run from a standard menu:
Code: Select all
menu:
"Who should I hang out with today...?"
"Yui":
if v_yui >= 25 and f_ch_05 == True and f_yui_05_complete == False and f_yui_04_complete == True:
call yui_05
elif v_yui >= 20 and f_ch_04 == True and f_yui_04_complete == False and f_yui_03_complete == True:
call yui_04
elif v_yui >= 15 and f_ch_03 == True and f_yui_03_complete == False and f_yui_02_complete == True:
call yui_03
elif v_yui >= 10 and f_ch_02 == True and f_yui_02_complete == False and f_yui_01_complete == True:
call yui_02
elif v_yui >= 5 and f_ch_01 == True and f_yui_01_complete == False:
call yui_01
else:
$ v_yui += 05
"I spent some time with Yui playing fighting games."
return
The conditions at play are:
- Every chapter (out of 5), a new character event becomes possible to unlock
- You must have a certain number of points in their route to unlock that event
- You can play a previous chapter's event in a later chapter if you hadn't unlocked it or gotten around to it back then
- If you have not unlocked the next event, or you HAVE done the most recently available event, it runs the else condition and you get a generic event which raises your route progress a little bit
- If you have already completed a character event, it should not play that one again
I believe I could theoretically come up with something on my own, but I'm almost certain it would not be the best solution.
What I'm trying to achieve with the button screen, is:
- Display whether or not a new event is available by checking the above conditions
- Display a bar above the imagebutton BG with the current route progress (I know how to make the bar but I'm not sure if it would work with the button as well?)
- Use the standard hover/idle background changes (I know how to do this)
- Call the correct event for that character (would this require the button to run a specific action that I define elsewhere, or should I dump all of the logic within the button code itself?)