• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Checking for Name?

JustX

The Mutant
34
Posts
8
Years
  • Can I check for the player name and if the typed name is correct a switch toggles and if not it doesnt?

    Thanks ^^
     

    JustX

    The Mutant
    34
    Posts
    8
    Years
  • Thanks, but how can I open the name entry to let the player enter his name? ^^
    Jump to label doesnt work, show label doesnt too.
     

    JustX

    The Mutant
    34
    Posts
    8
    Years
  • Yeah like in the intro, but not to set the name, to check the name
    if I use the pbTrainerName like in the intro, I set the name once again, thats not my aim. ^^
     
    91
    Posts
    14
    Years
    • Seen Sep 5, 2015
    Seriously, it's in that tutorial. Store the name in a variable. Store your "password" on a variable. Compare variables.

    ????
     

    JustX

    The Mutant
    34
    Posts
    8
    Years
  • You didnt understand my question...
    To store the variable is no problem, but how do I call the screen where I can type in a name to check, not to set the player name, because pbTrainerName calls the screen BUT sets the name once more, I want to type in but check only not set the player name.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    You're really not explaining yourself well. Perhaps a part of the problem is that you seem to want to test the player on whether they remember what they called themselves... which is idiotic, so of course we're not going to cotton on to what you're asking about because who would possibly want to do that?

    Are you asking about how to get the player to enter some text? pbEnterText does that quite well, and it's even aptly named. It returns the text the player typed, so you'll want to save that into a variable somewhere for later usage.

    If you simply want to compare the player's name to a word, just use if $Trainer.name=="Red".
     

    JustX

    The Mutant
    34
    Posts
    8
    Years
  • You're really not explaining yourself well. Perhaps a part of the problem is that you seem to want to test the player on whether they remember what they called themselves... which is idiotic, so of course we're not going to cotton on to what you're asking about because who would possibly want to do that?

    Are you asking about how to get the player to enter some text? pbEnterText does that quite well, and it's even aptly named. It returns the text the player typed, so you'll want to save that into a variable somewhere for later usage.

    If you simply want to compare the player's name to a word, just use if $Trainer.name=="Red".


    Sorry mate, its just that I wanted to create a man who blocks an entrance and checks for name, if you lie you cant go there and if you type your name correctly you can pass... it was just a little idea but it seems to be too complex :D
    Thanks for all your answers and sorry for my english ^^
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Just give the player a choice between "tell the truth" and "lie" in response to the man asking what the player's name is. I think there's a precedent for choices that aren't just "yes"/"no", so it wouldn't be that weird for the player to be asked this.
     

    JustX

    The Mutant
    34
    Posts
    8
    Years
  • Just give the player a choice between "tell the truth" and "lie" in response to the man asking what the player's name is. I think there's a precedent for choices that aren't just "yes"/"no", so it wouldn't be that weird for the player to be asked this.

    Actually Ive done exactly that :D You can now delete or close the thread whatever ^^
     
    Back
    Top