Tile - YGameSession - Get Reserved Game Id – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Image:{{PAGENAME}}.png]]
<!---
*Instructions allowing to transfer players between [[Ylands Game set|'''Game set''']] games.
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE.
-->
== Get Reserved Game Id(Session object) ==


===Reserve session===
[[File:YlandsTile-894.png]]
*If a '''free game instance''' is available, this instruction will try to reserve a '''game session''' for selected players.
**Game instance = game running on official dedicated server.
**Target game instance is chosen automatically.
**If there wont be any instance available, new instance will be spawned automatically.
*In order to reserve session, following input parameters has to be entered
**'''Guid''' - [[Ylands Change Game ID|'''Game ID''']] obtained via [[Ylands Game set|'''Game set manager''']]
**'''Players''' - list of players ([[Ylands Tile category - Array|'''Array''']]) to be transferred.
*If the reservation will be successful, the instruction will return a '''Session object'''.
**Session object - contains target server and list of players to be dispatched.
*If the reservation will fail, the instruction will return a '''Fail reason'''.


===Dispatch session===
<pre>static matchmakingGetReserveGameId(sessionObject: YSessionObject): string;</pre>
*This instruction will '''dispatch''' selected players using the '''Session object'''.
=== Parameters ===


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


===Example===
=== Returns ===
<gallery>
 
Image: Ylands-Game-set-session-2.png|Example
'''string'''
</gallery>
 
=== Availability ===
 
[[Ylands:Tile Availability - Server|Server]], [[Ylands:Tile Availability - Not in Edu|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'''.




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


[[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.