Jump to content

Entering Answers Along the Way


Batona

Recommended Posts

I have started building a cart. I have followed Firemeboy's tutorial. All is going well until I began thinking about what I want the player to do in each zone. Rather than merely visit the zone, the player will be responsible for finding a number. The idea that he'll gather numbers in each zone, add them together and provided he does that correctly, a set of coordinates will be revealed to a final location.

 

My issue is how to go about scripting this. Any ideas would be appreciated.

Link to comment

Hi!

 

Do you want the player to find the number and enter this value? If so, you should consider using a Getinput function.

 

If you don't know how, open the builder and follow these steps.

 

1. Creating an input variable

>Go to Variable > Add > Give it a name > Decide on a variable type (String: letters, Number: numeric values, Flag: true or false )

 

This variable will 'receive' the player's input.

 

2. Creating an input

>Go to Inputs > Add > Give it a name > Fill in the Text field with the question you want to ask the player, or perhaps a description of where the number is? > Decide on the type of your question- in this case, it would be 'text'. > For Pick an Object, choose a variable you created above.

 

3. 'Calling' the input function

Pick a good spot to call the input function. Will it be when the player enters a zone? Will it be when you talk to a character for the first time in a zone? When you're ready to call the input function:

>Under the Event Viewer, go to Add an action > Pick 'Get input from the player' > Select zinput > Pick a variable that you created in #1.

 

4. Scripting for the input function

Go to Inputs > Click on your input function > Click on 'When a player inputs data' >

 

Here you encounter an Event Viewer window. You then want to create an IF THEN ELSE.

Go to IF THEN ELSE > Click on Compare an object property or variable... > Click zobject.property, variable > Click Variable and pick the variable you created from #1 > Click operand > Select equal > Click zobject.property, value, variable > Fill in the value field with the correct answer. Then, go ahead and add an action for this, and ELSE (if the player does NOT get the answer right).

 

 

Was this helpful at all? Please let me know if you have any more questions! :anicute:

 

J2B2

Link to comment

In the 'Else' section you can display a message informing the user that the answer is wrong and then re-call the input script again.

 

The alternative to this would be to get the cacher to exit and re-enter the zone to get the event to trigger again. This is messy in my opinion and looks very strange in real life <_<

Link to comment

If you want the player to literally 'collect' the numbers, you can always make the numbers as items and put them in the player's inventory when he/she answers the puzzle correctly (Items in player's inventory will follow wherever he/she goes).

 

This allows players to have numbers to refer back to for the final zone puzzle.

 

Good luck!

 

J2B2 :lol:

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