How can I import a Game.Attribute into an actor typed in with the keyboard Attribute?

TRowe007TRowe007 Member Posts: 71
edited July 2014 in Working with GS (PC)

Say for instance i wanted to to import a keyboard name entry into a story, "the main actor would say something like, "whats your name?" and the new player would replay with the keyboard that pops up. Then the player's name would be entered, and the main actor would follow up with the name entered in his next line "saying, hello .......," ect.

Best Answers

  • tatiangtatiang Posts: 11,949
    edited July 2014 Accepted Answer

    @TRowe007 said:
    It doesn't run through all the way, its a little incomplete. But that is what I'm trying to do thanks. The (input) actor where it says, (if:) (self.tempinput), not finished, and the (change attribute), (set:) (self.tempinput), (to), ?

    Sorry, it's a Mac Creator file and I didn't realize you had posted in the PC subforum.

    By the way, some of those attribute values are supposed to be blank. I'm purposely resetting the value of a text attribute to [blank].

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Posts: 11,949
    Accepted Answer

    Here are screenshots in case the Mac Creator file doesn't work properly on your PC. Both actors should be placed on a scene.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Posts: 11,949
    Accepted Answer

    Here's how the demo I posted should look:

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375

    Create a text attribute (I'll call it name)
    When the dialog comes up that asks him for his name use the keyboard input to save his name to game.text and save that attribute.
    In the expression editor you would put "Hello "..game.text..". How are you?" for example

  • TRowe007TRowe007 Member Posts: 71

    ok, now will this setup still work with me using a table that hold the conversation in it?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Here's an example of how to use tables with the Keyboard Input behavior.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • TRowe007TRowe007 Member Posts: 71
    edited July 2014

    It doesn't run through all the way, its a little incomplete. But that is what I'm trying to do thanks. The (input) actor where it says, (if:) (self.tempinput), not finished, and the (change attribute), (set:) (self.tempinput), (to), ?

  • TRowe007TRowe007 Member Posts: 71
    edited July 2014

    This is what I started mine from witch I believe is your example as well.

    https://www.dropbox.com/s/jf7p07e7x1r38je/Dialog v3.zip

  • TRowe007TRowe007 Member Posts: 71
    edited July 2014

    @tatiang said:
    Here are screenshots in case the Mac Creator file doesn't work properly on your PC. Both actors should be placed on a scene.

    Ok all the images are lined up perfectly to what is written in the template, but if I run the game in the template and answer the question by typing my name into the keyboard I click done and it doesn't do anything, (continue the conversation).

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    if I run the game in the template and answer the question by typing my name into the keyboard I click done and it doesn't do anything

    Can you post a link to download the file you're working from?

    That Dialog demo is mine but it serves a different purpose.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • TRowe007TRowe007 Member Posts: 71

    Yeah that's what I'm trying do. But I've set my game up already off of your dialog demo. I don't see the difference in propose, they seen the same just one is more in depth. Ok are you asking to see my game or the file I'm copying off of?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Well, the Keyboard Input with Tables demo allows you to type in text and have the next prompt display that text, while the Dialog demo doesn't allow any input but rather just displays text in a certain order based on the table layout.

    I thought you were saying that the Keyboard Input with Tables demo wasn't working for you, so I'm trying to see why that might be. What I meant was that you could post (or send via private message) your project file and I could look at how you have it set up.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • TRowe007TRowe007 Member Posts: 71

    ok I'm sending it now

Sign In or Register to comment.