Thanks a bunch to both of you for your help. I was thinking about 'class', but I haven't really learned about that yet. I've mostly learned about 'variables' and 'lists' in my studies of Python programming. I've done the first third of classes for Python, Ruby, and JavaScript on
Code Academy. I am definitely willing to learn if need be. One of my major goals is not to create an individual screen for each character for each action/event that happens.
Your questions also leads into my next step that I am trying to figure out. Below is part of the menu system that I have been working on. Current "charlist" is the list of characters that are in your group. As the game develops, Characters will be added and removed. With the first menu, the the list of characters are displayed as buttons. When their names is clicked, the Character Info screen will appear with their stat information.
Code: Select all
screen char_menu:
tag menu
frame pos (10, 60) xminimum 580:
vbox:
for x in range(0, len(charlist)):
$ chardisplay = charlist[x]
textbutton _("[chardisplay]") action [SetVariable("currentchar", chardisplay), ShowMenu("char_info")]
screen char_info:
tag menu
frame pos (10, 60) xminimum 580:
vbox:
label "[currentchar]"
label "Strength: [alexstat[1]]"
textbutton _("Back") action Return()
As you can see so far, I can display the screen with the Character's name, but I don't know how to pull their information yet. As of now, I just wrote in the filler "alexstat[1]", but that would not work for my goals. I would like to have it display Alex's Strength stat after it pulled the information from my character stat section.
So, this loops back to what method I would want to store the stat data. As you can see my secondary goal, what method would you recommend and how would I be able to pull? If you believe that class is the best way, I would love to learn.
Thanks again for your help!