RPG (Part 5)

3

Index

Attached Files

The following files have been attached to this tutorial:

.capx

Stats

4,723 visits, 9,778 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 4 Dec, 2015. Last updated 19 Feb, 2019

I am sorry I should have done this as PART 2 but no harm done. Please accept my request for forgiveness.

Before we go anywhere about NPC (non-player character) and how to Interactions with NPC? What shall we use?

• INPUT textbox?

• Just textbox appearing and closing (disappearing) and (reappearing)

Whatever you think is best but, must be first-rate of Interactions with NPC (non-player character). So the players can understand what is happening around them in game. If you don’t then no one wants to know about your game.

So here we will be covering:

• Learning how to store user data in a Construct 2 Dictionary object.

• Implement a validation system for our user to be entered or denied!

• Get our data from our dictionary and relay it to a global in-game message!

Let’s create new Layout. Name it RPG_World also event sheet name it RPG_World.

Set layout size to 640 x 480

Reason for this 640 x 480 is in future if you want adds more you can do so.

What we are going to do is ask our player for his NAME and then if he or she enters name then it will be validated and let them enter our RPG GAME WORLD.

So first we need Textbox and Button objects on layout.

Insert Textbox (object) name it txt_PlayerInput

Insert Button (object) name it btn_RPGWorld

Insert Textbox (object) name it txt_Validate set this to INVISIABLE

For BUTTON text just say Enter World

For this tutorial I am not using Sprite Fonts but you can.

Let’s change first Textbox property.

In Please enter your name

For tool tip just say please enter your name

Now if we run the project nothing happen and furthermore you have to click in textbox to set focus. Well just open your RPG_World Event Sheet. Enter code below.

System start of layout > set Focused this statement should put cursor in txt_PlayerInput at start. Therefore player do not have to click and set focus.

  • 0 Comments

Want to leave a comment? Login or Register an account!