Game logic - Ask Player – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "[[File:{{PAGENAME}}.png|right|400px|Properties]]↵" to "<!-- [[File:{{PAGENAME}}.png|right|400px|Properties]] --> ")
 
(27 intermediate revisions by 2 users not shown)
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 logic. Such answer can be then operated with using '''Answer Text''' literal.
*Initiated via Show prompt instruction
*When called, it will open edit window and will wait for player input
*Player's answer can be then used as Answer text, when On answered event is called (see example)


=Properties=
*It will open edit window and will wait for player input
*Question - text shown in the header of input prompt window
*Player's answer will return in '''On Answer''' event as as '''Answer Text''' (see example)


=Events=
<gallery>
*On open - called when input window opens
Image:Ylands-Editor-Ask-Player-example1.png|Input Prompt
*On closed - called if player decides to close the window
Image:Ylands-Editor-Ask-Player-example1b.png|On Answer
*On answered - called after player confirms the window
Image:Ylands-Editor-Ask-Player-example1c.png|Show Prompt
</gallery>


=Instructions=
= Properties =
*Show prompt - it will initiate Ask player game logic
<!-- [[File:{{PAGENAME}}.png|right|400px|Properties]] -->
*Get question -  returns current question text (string)
=== Question ===
*Set question - will set question text
*Text shown in the header of input prompt window


=Literals=
= Ask player events =
*Ask player - Ask player game logic
*[[Ylands:Tile - Input Prompt On Answer|On Answer]]
*Answer text - string with player's input
*[[Ylands:Tile - Dialogue On Open-Close|On Open / Close]]
*Questioner - entity asking the question
*Player - player answering the question


= Related instructions =
*[[Ylands:Tile - Show input prompt|Show Prompt]]
*[[Ylands:Tile - Input prompt question|Get / Set Question]]


{{Game logic List}}
 
----
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|13}}}}
 
[[Category: Game Logic]]
[[Category: Ylands 0.10]]

Latest revision as of 21:16, 8 August 2024

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 logic. Such answer can be then operated with using Answer Text literal.

  • It will open edit window and will wait for player input
  • Player's answer will return in On Answer event as as Answer Text (see example)

Properties

Question

  • Text shown in the header of input prompt window

Ask player events

Related instructions