Keyboard input change scene

Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
edited November -1 in Working with GS (Mac)
Hey guys,

I know I've posted about this before, but I didn't get an answer that worked for me.

What I would like to do is what someone, in my game, presses a button, it brings up the keyboard, and when they type in their name, if it is a name my game knows, it changes to a scene that was made by the person who typed it.

Example: I type in 'Braydon_SFX'. The game then brings me to a level that I made.

Any ideas?

Thanks!

Comments

  • theCodeMonsterstheCodeMonsters Member Posts: 359
    1) Create an attribute that will store your name input. well call this name. Then create another attribute to store all names. well call this storage.
    2) Create a rule stating if is pressed then put the behavior to pull up the keyboard and set it to change your attribute
    3) then create an rule in the same rule as your "if pressed" and say if storage contains the name Then change scene to whatever scene you want (HERE is a problem. You cannot generate a scene) So you need to figure out an alternative way to reference a pre-made scene.

    ___________________________________________________________________________
    I'm teaching an online programing course go here to find out more!!! http://gamesalad.com/forums/topic.php?id=31505
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hey CodeMonsers~

    Hey thanks, I got it to work thanks to your tip about 2 attributes.
    The rest was just plain logic, but I do not think your way you mentioned above works.
    Of course, i didn't try it ;)

    But thanks for your help m8!
  • theCodeMonsterstheCodeMonsters Member Posts: 359
    I've done it before Haha wether or not It is implemented correctly is a different story ;)
    ___________________________________________________________________________
    I'm teaching an online programing course go here to find out more!!! http://gamesalad.com/forums/topic.php?id=31505
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Indeed :-)

    I have another problem, though. The scene changing is working..Kinda.

    You type in a name, and press done. It doesnt change scene...You HAVE to press the button and it brings up the keyboard again, but right then it does change scene, so while the keyboard is coming up, it changes scene...Weird, any idea why?

    Another problem, if i type in a name, it changes scenes, but then if I go back to the scene that contained the button, it still have that name in there, so when you press it, like I said before, it will change scene.

    So I would like it to, after it has changed scenes, remove any text that is in the keyboard input...
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Although, CodeMosters, you said you had to put in 2 attributes, I am guessing 1 of them would be a text attribute, what would the other be?
  • theCodeMonsterstheCodeMonsters Member Posts: 359
    The other would also be a text attribute. One of them would be the temporary name. The other would be for storage. You would simply add the temporary text to the storage text attribute. Then reset the temporary text to nothing. It's a little complicated. :) I can give you a one on one and show you how to do it if you want.
    ___________________________________________________________________________
    I'm teaching an online programing course go here to find out more!!! http://gamesalad.com/forums/topic.php?id=31505
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Yeah that would be cool. :-)
    Email me at braydon@coyer.net

    Thanks m8
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Bump
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Bump
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Bumping again :P
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hey guys, bumping again.
    I still need to find out how i can hold multiple names in one attribute.
    As CodeMonsters said:
    theCodeMonsters said:
    The other would also be a text attribute. One of them would be the temporary name. The other would be for storage. You would simply add the temporary text to the storage text attribute. Then reset the temporary text to nothing. It's a little complicated. :) I can give you a one on one and show you how to do it if you want.

    Thanks

    Edit: However, he never emailed me :P
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Bump :)
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Bump again
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Bump yet another time.
  • theCodeMonsterstheCodeMonsters Member Posts: 359
    Hey, Sorry about that, I emailed ya.
Sign In or Register to comment.