Alright, first the code :
Code:
mc_b = getattr(store,"mc_b")
It do what you want, but here it's useless since "store.mc_b", and even "mc_b", let you directly access to the value. The prefixed syntax is better, because it clearly show that you talk about a variable/attribute in the Ren'py default store, and not a local variable/attribute.
getattr is to use when the name of the variable/attribute isn't fixed, like in your
statschangeNotify where the name is stored into a variable. But here you know the name and it will always be the same.
Code:
if mc_b >= 40 and mc_b < 100:
Python can works with intervals. I don't know if it's faster or not, but it's definitively easier to read. Like you begin with Python, using the most readable way is always the best option, because it let you focus on things more complex.
This code is in a init -10 python: block, which might have something to do with it
No, the place where the code is declared change nothing. It's just the place where the code is called which have a influence. By example, running it at "init" level will obviously lead to a problem since there nowhere to display a screen at this time.
All this said, I just tried your code, exactly like you wrote it. And it works, the screen (well, the things I put behind "screen ingame_menu_display" for my test) is displayed and all.
Anyway, you said that you tried to display it directly from Ren'py and that it doesn't worked. So, my guess is an error somewhere in the screen. But a subtle error. Something that don't crash because it's a valid syntax, but still display an empty screen or directly return. More or less like the indentation problem you had last time. All works, but because of this little subtle error, it doesn't work at all like expected.
Still I'll go for a full debug process, it can help you in the future. But before this, because indentations are a real problem let's be clear : Your file look like this, right ?
Code:
init -10 python:
[can be something or nothing, but at least at this level of indentation]
def w_mc():
[your code]
Like you can multiply the "init" blocks in a single file, in case of doubt just put an "init -10 python:" (without any indentation obviously) right before the "def w_mc():" (with a 4 indentation, and the code of the function with a 8 indentation).
Now that we are clear and sure that the problem is not the indentation, let's go...
1) Rename the screen "ingame_menu_display1", and write a basic "ingame_menu_display" screen for the test. Something really simple which will never fail like :
Code:
screen ingame_menu_display:
frame:
text "working"
Is it working now ? If yes, it's the screen the problem.
2) Return to the initial "ingame_menu_display" content and change the "start" label of your game like this :
Code:
label start:
show screen ingame_menu_display
"blablabla is this working ?"
return
[the actual content of your "start" label]
Is the screen displayed ? If yes, it's not the screen. Yeah I know, obvious
but like you know that you function is correct, since it works for me, it's still a progress.
3) Try with the most basic function possible :
Code:
def w_mc():
renpy.show_screen("ingame_menu_display")
Once again, rename your actual function "w_mc1" like for the screen ; no need to loss your works.
If it works, it's somewhere in the function. The only difference between your version and the one I tried is "statschangeNotify". I used a "renpy.notify" instead since I don't have the code anymore. So, the problem come from somewhere in "statschangeNotify".
4) If it still don't work, it's weird. It probably mean that the moment you call the function is not appropriated for a "show screen". So, back to the "start" label, this time with :
Code:
$ w_mc()
"blablabla is this working ?"
return
If it works, it's because you call it at a moment where Ren'py don't agree to display a screen. But it's still weird.
Nope, it returns a "global name 'ingame_menu_display' is not defined"...
Yeah, the syntax suggested assume that "ingame_menu_display" is a variable, so it can't works. The syntax you use for "renpy.show_screen" is correct.
Oh, by the way, try: "renpy.call_screen" ? It works differently and probably isn't what you wanted, but who know.