help regarding actor destroying after accepting data

I am looking to create an input box/actor that will accept input boolean data and after that to disappear(destroy) and another box to appear in that place with the value the user entered. I have done everything except from the part of disappearing. Anybody can help me with this?

Please not that i will have a button that will recall the function of adding the data in the box.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    How do you accept input boolean data? Are you wanting the player to type in "true" or "false"?

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

  • kieron13kieron13 Member Posts: 5
    Sorry my mistake. Not boolean. Integer. Yes the user will type the numbers
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Create a text attribute called game.input and an integer attribute called game.inputValue.

    Set up these rules:

    If touch is pressed
         keyboard input [prompt] [attribute: game.input]

    If game.input ≠ [blank]
         [no behaviors]
    Else
         change attribute game.inputValue to game.input.
         Spawn actor [display actor name]
         Destroy actor

    In your display actor name, use display text to show game.inputValue.

    *Note that [blank] in this case is just nothing... don't type anything on the right side of the rule condition. Also, unless you use a custom keyboard, the user will be able to enter anything, such as "asdjlkgaksfd" or "999995" when they type their input. Decimals will be rounded and letters/puntuaction will be converted to zero.

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

  • kieron13kieron13 Member Posts: 5
    Hello. I a bit confused. Actually i can not find how to add keyboard input [prompt] [attribute: game.input]

    If game.input ≠ [blank]


    What i did is to create the box to insert the value and save it as value1. Then i am loading the value 1 to the place i want it to appear. My problem has to do with the disappearing of the boxes that accepts the value.

    So basically i want the rule: When input is added the box will destroy. Remeber i am using windows platform so please use windows information.


    ps: MAc platform is amazing and much simplier. Why are you not make it the same?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I thought I did use Windows information...



    If you want something to be destroyed after keyboard input, you'll have to use the rules I suggested above.

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

Sign In or Register to comment.