We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I would like to add a sort of sign in affect to my game ( which by the way is a huge success) like I want to be able to add a place were you can type something, press enter, then have it take me to my game. I hope that is possible :))
Answers
Sure. Use states.
Again, don't forget to use a category. Moved.
For simple input, the methods shown above is enough. If you start to have complex needs, use a GUI library like G4P, ControlP5 or similar.
Okay, thanks. Very much
But what is s.equals?
s.equals("start")
this compares the contents of the string
s
with the character sequence 's', 't', 'a', 'r', 't' and returns true if there is an exact match (including case).Thank you quark. You are a nice person. Anyways I know I'm a bit exasperating but finally so I can get all this, what is a string?
String
Remember my advice to search in the Reference page? Don't forget to click on the links you find, too...
Than you all, mostly PhiLHo and Quark. These are great people and I feel privileged to receive advice from them.
Hello,
I assume you want the player to enter his/her name and then the name is displayed during the game.
As you know we use variables to store stuff we need later, like
The type here is int. The type tells processing, this variable is an integer number or a float number or a boolean etc. See reference.
For storing a word like TechWiz the type is String. See reference.
So we could say
Please note the important " " signs.
I assume you want the player to enter his name and then the name is displayed during the game.
this would be this sketch
You have to build it into your sketch. There you probably already have states for start screen etc. You probably also have setup() and draw() already so you need to read my sketch, understand it and copy the parts you need into yours...
Best, Chrisir ;-)
Thank you Chrisir. Please check out my new post