Question about L's 1-Person Menu - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Games Development (https://www.save-point.org/forum-4.html) +--- Forum: Code Support (https://www.save-point.org/forum-20.html) +--- Thread: Question about L's 1-Person Menu (/thread-232.html) |
Question about L's 1-Person Menu - yamina-chan - 05-12-2010 One of games I'm working on uses the 1 Person Menu found here. (The one without SDK) It includes the ability to show a Variable that I haven't used yet, but I would like to. Problem is: I don't know how. Code: #Draw Variable I can name the Variable just fine, but I can't figgure out how to actually show a certain Variable in that spot. Again I wish I'd have a better understanding of scripting but since that's not the case I'll hope that one of you, who is more knowledgable then I am is willing to help me. It may not be something really importand, but it's still d tad annoying to know that the possibility is there and you're just unable to figgure it out. Thanks in advance. [Resolved] Question about L's 1-Person Menu - DerVVulfman - 05-15-2010 The Game_Variables class is the class that holds your variables, much like Game_Switches is for the switches... print $game_variables[3] Would print the value of the 3rd variable (0003). So I guess... Code: self.contents.draw_text(540,0,120,32,$game_variables[var_id]) [Resolved] Question about L's 1-Person Menu - yamina-chan - 05-15-2010 I tryed it and I get an error when I try to open the menu. Script '1-Person Menu' line 144: TypeError occured. cannot convert Fixnum into String [Resolved] Question about L's 1-Person Menu - DerVVulfman - 05-16-2010 DOH! Sorry. I forgot to add the .to_s suffix: Code: self.contents.draw_text(540,0,120,32,$game_variables[var_id].to_s) [Resolved] Question about L's 1-Person Menu - yamina-chan - 05-16-2010 Things like that happen to the best of us. It's working now, thanky you very much ^-^ Edit: Actually...looking at other parts of the script now with the new knowledge as to how it worked, I might would have been able to figgure it out myself after all...but then again, I didn't know how it worked befor XD But I think I'm a step closer to understanding how to configure scripts now =D (It's always nice to have the feeling that you understood something that you couldn't understand befor ^^) |