BlueScope":1wsx1l97 said:[Really loong post by BlueScope]
Thanks for the comment \o
1- I like the blank line to separate blocks of code. I think it improves reading.
2- The alias... man, I read that once in the SDK conventions and I thought "well, if there is some sort of convention out there, I should follow". And i really think it is a good idea to avoid name clash =P
3- The Scene_Name issue is 99% probably your fault lol Post the code and I can try to help.
4- Well, I really didn't have the ambition to make a complete Input module here. I mean, there are a lot (at least two) very good input modules out there that people are used to. All they lack is this one feature, so I thought "I should do a module to complete them, there's no need to redo everything". About combining, there's really no reason not to. If you read the DLL code you'll see, my approach doesn't use the same method the others do, and it doesn't interfere with the key states or whatever.
5- Yea, I know this script is not that useful. Actually, I made this with online games in mind. And because I was bored and wanted to mess with windows api. A few months ago I released my RWK here (another fun-to-make-not-so-useful script) and I wanted to make a little sample forum for it, and I couldn't find an input script that worked for everything. But even for offline games I think full text input could be a good addition: think about a notepad in a mistery game, or something like that. Or just to make a Scene_Name that doesn't look like made for SNES.
6 and last- I have a few years of experience with Java and some C/C++. I mess with Ruby now and then. It is pretty easy to learn, but I never really studied all the dynamic-language features, so I guess my scripts look like java code translated XD
=O Oh, I get it. They're instance variables of the Class object. What confused me is that they're defined in the class body. How do I tell if a @variable is an instance variable of the Class object or an instance variable of the instances of the class, then? O.oNeo-Bahamut":1wsx1l97 said:An instance variable, as Glitchfinder said.2- They were needed. Is there any other way to store info relative to the module itself?
The difference is, that you can not access those instance variables in an instance of GTI.
Class variables are available in a larger scope, for example instances of a class.Code:p GTI.instance_variable_get(:events) # should print something p GTI.new.instance_variable_get(:events) # should print nil
The class variables are actually like the static variables in Java.
GTI is an instance of the class "Class". And as it is an instance of something, it can have its own instance variables.
Neo-Bahamut":1wsx1l97 said:This is not what I meant. I was talking about String s = ' '*8.3- I know that "private" doesn't do anything in RGSS, but since it is a part of actual Ruby, I thought I should put it there to remember "DO NOT USE THIS METHOD" XD
LOL I DIDN'T SEE I DID THAT XD
As I said previously about the semi-colons, that's my Java side working XD
Thanks, I'll correct it right now =]
You couldn't even get the Scene_Name example to work?Kiriashi":1wsx1l97 said:Would you mind providing a demo?
I can't seem to get this to work with my crappy RGSS knowledge. :rock:
Just paste GTI anywhere above Main, and the Scene_Name script above main and below GTI (and the original Scene_Name). Then download the DLL and put it in the same directory as Game.exe.
Make an event that asks input for hero name to test.