Jump to content

displaying variables to player


Rusty O Junk

Recommended Posts

Display a message, and make the text like this:

 

[[it took you ]]..variable_name..[[ minutes to get here.]]

 

I tried that and it wouldn't compile.

 

Ranger Fox, I don't understand what you are saying. Open the code in what and how do I move it to and where is the Author Functions?

 

In the Wherigo tutorial wherigo_player_tut the player names the alien. Later the Wherigo cartridge shows the player some text using the name you just gave your alien. This is pretty much what I want to do only I want to show the player the numerical value of the variable every time it changes through the players actions.

 

The source code for the tutorial is locked so I can't see how that was done.

Link to comment

I tried that and it wouldn't compile.

Did you use the correct variable name? Are you using an updated version of the builder?

 

Ranger Fox, I don't understand what you are saying. Open the code in what and how do I move it to and where is the Author Functions?

The .lua file you see is a simple text file. You can open it with any text editor. Double-click on it and Windows will ask what program it should use to open the file. Choose notepad and you can see the code. The builder application you're using creates this file for you.

 

In the Wherigo tutorial wherigo_player_tut the player names the alien. Later the Wherigo cartridge shows the player some text using the name you just gave your alien. This is pretty much what I want to do only I want to show the player the numerical value of the variable every time it changes through the players actions.

 

The source code for the tutorial is locked so I can't see how that was done.

You'll have to edit the code yourself for that. You can make everything in the builder up to the point where you need to insert the alien's name (using the example).

 

Here's some quick steps. I can't go into too much detail at the moment because it's past 2:30 AM and I need to sleep before I get up for church in the morning.

-- Create a variable. Since you're not letting the user type the value, this can be a number.

-- Since I'm using an input to determine how I should change the variable (I'm calling it "runningcount"), I created a second variable to store the user's input.

-- Right your code changes the value, add a message. Type everything else but the number.

-- Save your code and open it in notepad.

-- Do a search for what you just typed and edit the line.

 

I included a quick example. Enter the zone and answer the question. The variable will increment depending on the answer provided.

 

If you have any more questions, please post them to the thread and someone will provide you with an answer.

rusty.zip

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...