Tile - YGameSession - Get Reserved Game Id – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}")
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Image:{{PAGENAME}}.png]]
<!---
*Instruction allowing to transfer a player to a game within same [[Ylands Game set|'''Game set''']].
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE.
**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.
-->
**The [[Ylands Matchmaking|'''Matchmaker''']] will '''always''' spawn '''new server instance''' if enough players are available.
== Get Reserved Game Id(Session object) ==
**The [[Ylands Matchmaking|'''Matchmaker''']] '''will not transfer''' player to already '''running instances'''.


[[File:YlandsTile-894.png]]


===Start Matchmaking===
<pre>static matchmakingGetReserveGameId(sessionObject: YSessionObject): string;</pre>
*Player will be added to [[Ylands Matchmaking|'''Matchmaker''']] queue for listed games.
=== Parameters ===
**'''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'''.
==== sessionObject ====
**Session object - contains target server and player to be dispatched.
*If the reservation will fail, the instruction will return a '''Fail reason'''.


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


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


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


===Get reserved Game Id===
[[Ylands:Tile Availability - Server|Server]], [[Ylands:Tile Availability - Not in Edu|Not in Edu]]
*Returns the [[Ylands Change Game ID|'''Game ID''']] of game where the player can be dispatched to.
*Guid is determined from the '''Session object'''.


=== Description ===


===Example===
Returns the '''Game ID''' of game where the player can be dispatched to.
<gallery>
 
Image: Ylands-Game-set-session-2.png|Example
=== Notes ===
</gallery>
 
* Guid is determined from the '''Session object'''.




----
----
{{Ylands scripting navbox}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}


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

Latest revision as of 15:27, 24 November 2023

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.