Game logic - Ask Player – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
=Description=
=Description=
Game logic used for prompting player for specific, written, answer. Such answer can be then operated with by using 'Answer text' literal.
Game logic used to query specific answer from a player. When the game logic is initiated trough [[Ylands Tile - Show input prompt|'''Show prompt''']] instruction an input dialog will be shown to a player. Player then can enter and submit the answer, which will call [[Ylands Tile - Input Prompt On Answer|'''On Answer''']] event inside the Ask player Game logic. Such answer can be then operated with by using '''Answer text''' literal.
*Initiated via Show prompt instruction
 
*When called, it will open edit window and will wait for player input
<gallery>
*Player's answer can be then used as Answer text, when On answered event is called (see example)
Image:Ylands-Editor-Ask-Player-example1.png|Input dialog
Image:Ylands-Editor-Ask-Player-example1b.png|On Answer
Image:Ylands-Editor-Ask-Player-example1c.png|Input prompt
</gallery>


=Properties=
=Properties=
*Question - text shown in the header of input prompt window
===Question===
 
*Text shown in the header of input prompt window
=Events=
*On open - called when input window opens
*On closed -  called if player decides to close the window
*On answered - called after player confirms the window


=Instructions=
=Ask player events=
*Show prompt - it will initiate Ask player game logic
*[[Ylands Tile - Input Prompt On Answer|On Answer]]
*Get question - returns current question text (string)
*[[Ylands Tile - Dialogue On Open-Close|On Open / Close]]
*Set question - will set question text


=Literals=
=Related instructions=
*Ask player - Ask player game logic
*[[Ylands Tile - Show input prompt|Show question]]
*Answer text - string with player's input
*[[Ylands Tile - Input prompt question|Get / Set question]]
*Questioner - entity asking the question
*Player - player answering the question




----
----
{{Ylands scripting navbox}}
{{Ylands scripting navbox}}

Revision as of 17:03, 2 December 2018

Description

Game logic used to query specific answer from a player. When the game logic is initiated trough Show prompt instruction an input dialog will be shown to a player. Player then can enter and submit the answer, which will call On Answer event inside the Ask player Game logic. Such answer can be then operated with by using Answer text literal.

Properties

Question

  • Text shown in the header of input prompt window

Ask player events

Related instructions



Template:Ylands scripting navbox