Skip to content

Custom names typing system

Al'rind edited this page Jul 13, 2015 · 3 revisions

The casual Event-Making's command to enter a name is, not quite handy, but also not customizable at all. The purpose of this little tutorial is to show a simple way of building a customized typing system, using text fields.

Before starting

In order to completely understand how text fields work, we are inviting you to read the documentation of available commands here: Text fields' documentation

Global behaviour

Firstly, we suppose that a character is asking our name.

  • We display an introduction's message
  • We retrieve the name of the hero n°1
  • We display the text field
  • We activate it
  • We loop: * until the key enter has been pressed
  • Once outside the loop
  • We retrieve the text field's content
  • We delete the text field
  • We assign the retrieved name as the new hero's name
  • END !

Code's suggestion

Pompompidou picture

Explanations

The code does not need any further details, the first script's call use a little bit of arithmetic to correctly place the text field on the screen.

Visual render

Here is a little example :)

Pompompidou picture

ET VOILA :dance:

Clone this wiki locally