I'm trying to create a character creation wizard for the game. In one class, I compute the attributes of a character. In another class, I show the user which specialties are available based on symbol attributes. However, I don’t remember how to pass variables between different classes.
Here is an example of what I have:
class BasicInfoPage(wx.wizard.WizardPageSimple):
def __init__(self, parent, title):
wiz.WizardPageSimple.__init__(self, parent)
self.next = self.prev = None
self.sizer = makePageTitle(self, title)
<---snip--->
self.intelligence = self.genAttribs()
class MOS(wx.wizard.WizardPageSimple):
def __init__(self, parent, title):
wiz.WizardPageSimple.__init__(self, parent)
self.next = self.prev = None
self.sizer = makePageTitle(self, title)
def eligibleMOS(self, event):
if self.intelligence >= 12:
self.MOS_list.append("Analyst")
The problem is that I cannot figure out how to use the "intelligence" variable from the BasicInfoPage class to the MOS class. I tried several different things from all over the Internet, but nothing works. What am I missing?
Edit I realized that after I posted this, I didn’t explain it very well. I have been trying to create a computer version of Twilight 2000 RPG since the 1980s.
wxPython ; - wxPython. , " " ( BasicInfoPage) "" . , "self.intelligence".
, , , . , , . , Intel Anaylst.
, , . , , , .