Jump to content

Using a variable in Input


Repmul

Recommended Posts

Using Earwigo, is there a way to use a variable within the Input text?

 

I am trying to use an Input to ask the player a question. I have tried a

couple different variation, but both wind up displaying the text, not the

value of the variable.

 

Is your name: ~~Player.Name~~

 

I have also set var_Name = Player.Name, then change the Input text to:

Is your name: ~~var_Name~~

 

Ranger Fox, was informed that the following statement will work in Groundspeak's builder:

Is your name ]] .. Player.Name .. [[?

 

Does anyone know of a statement that will work with Earwigo?

Link to comment

Using Earwigo, is there a way to use a variable within the Input text?

 

I fear Inputs will not display changing variables.

 

Workaround 1:

------------

 

I assume that only yes and no will be valid answers

 

Create a Message "DisplayPlayerName" that has the following inside the Text box:

Are you ~~Player.Name~~

Change Button 1 text to "Yes"

Change Button 2 text to "No"

 

Create the extremely useful expression

Button1Clicked

Button was clicked Button 1

Use If Then Else to evaluate the answer.

 

Workaround2 (Yes/No not possible):

---------------------------------

 

Create a Message "WeNeedAge" that has the following inside the Text box:

Hello ~~Player.Name~~, we need your age.

 

Display the Message "WeNeedAge"

	Display dialog or message Message:WeNeedAge

 

Now use the Message Event to trigger the Input

	Get input from player PlayerInput

 

The input can now have the required question e.g. "What is your age?"

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...