Tile - YGameSession - Get Reserved Game Id – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (YlandsClassyBot moved page Ylands Tile - Matchmaking to Ylands:Tile - YGameSession - Get Reserved Game Id: New Structure)
No edit summary
(One intermediate revision by the same user not shown)
Line 1: Line 1:
==Overview==
<!---
[[Image:{{PAGENAME}}.png]]
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE.
*Instruction allowing to transfer a player to a game within same [[Ylands Game set|'''Game set''']].
-->
**Player will be added to [[Ylands Matchmaking|'''Matchmaker''']] queue. If there will '''enough players''' queuing for the same game, they will be then '''transferred''' to '''newly spawned server''' of that game.
== Get Reserved Game Id(Session object) ==
**The [[Ylands Matchmaking|'''Matchmaker''']] will '''always''' spawn '''new server instance''' if enough players are available.
**The [[Ylands Matchmaking|'''Matchmaker''']] '''will not transfer''' player to already '''running instances'''.


== Start Matchmaking ==
[[File:YlandsTile-894.png]]
*Player will be added to [[Ylands Matchmaking|'''Matchmaker''']] queue for listed games.
**'''Guids''' - list ([[Ylands Tile category - Array|'''Array''']]) of [[Ylands Change Game ID|'''Game ID''']] obtained via [[Ylands Game set|'''Game set manager''']] which the player will be matched to.
**'''Player''' - player to be added to [[Ylands Matchmaking|'''Matchmaker''']] queue.
**'''Priority''' - [[Ylands Matchmaking|'''Matchmaker''']] request priority.
***Player requests with higher priority are prioritized over the other.
***If there are players matchmaking for same game(s), but with lower priority, they will be added to the players with higher priority.


*If the reservation will be successful, the instruction will return a '''Session object'''.
<pre>static matchmakingGetReserveGameId(sessionObject: YSessionObject): string;</pre>
**Session object - contains target server and player to be dispatched.
=== Parameters ===
*If the reservation will fail, the instruction will return a '''Fail reason'''.


== Cancel matchmaking ==
==== sessionObject ====
*This instruction will '''cancel''' current [[Ylands Matchmaking|'''Matchmaker''']] request.


== Dispatch session ==
=== Returns ===
*This instruction will '''dispatch''' selected player using the '''Session object'''.


== Fail reason ==
'''string'''
*Reason why the reservation has failed.
*Can be compared with [[Ylands Tile - Matchmaking fail type|'''corresponding enumerator''']].


== Get reserved Game Id ==
=== Availability ===
*Returns the [[Ylands Change Game ID|'''Game ID''']] of game where the player can be dispatched to.
*Guid is determined from the '''Session object'''.


== Example ==
[[Ylands:Tile Availability - Server|Server]], [[Ylands:Tile Availability - Not in Edu|Not in Edu]]
<gallery>
Image: Ylands Tile - Matchmaking-example1.png|Example
</gallery>


== See also ==
=== Description ===
*[[Ylands Tile - Reserve game session|'''Reserve session''']]
 
*[[Ylands Matchmaking|'''Matchmaking''']]
Returns the '''Game ID''' of game where the player can be dispatched to.
*[[Ylands Game set|'''Game set''']]
 
=== Notes ===
 
* Guid is determined from the '''Session object'''.




Line 48: Line 33:


[[Category: Instructions]]
[[Category: Instructions]]
[[Category: Ylands 1.4]]

Revision as of 12:15, 12 November 2021

Get Reserved Game Id(Session object)

YlandsTile-894.png

static matchmakingGetReserveGameId(sessionObject: YSessionObject): string;

Parameters

sessionObject

Returns

string

Availability

Server, Not in Edu

Description

Returns the Game ID of game where the player can be dispatched to.

Notes

  • Guid is determined from the Session object.