Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

GetGlobal

Returns the value of a global variable VarName from the specified GlobalRegion.

In Pascal, GlobalRegion is a string: 'stealth' (visible to all characters in the current Stealth instance) or 'char' (visible only to scripts of the current character). Case-insensitive.

In Python, GlobalRegion accepts the Global enum: Global.Stealth (0) or Global.Char (1).

Returns an empty string if the variable is not set.

Возвращает значение глобальной переменной VarName из указанного GlobalRegion.

В Pascal GlobalRegion — строка: 'stealth' (видна всем персонажам) или 'char' (видна только скриптам текущего персонажа). Регистронезависимо.

В Python GlobalRegion принимает enum Global: Global.Stealth (0) или Global.Char (1).

Pascal

function GetGlobal(GlobalRegion: String; VarName: String): String;

Python

def GetGlobal(GlobalRegion: int, VarName: str) -> str: ...

Pascal Example

begin
  if GetGlobal('stealth', 'FollowMode') = '1' then
    AddToSystemJournal('Follow mode is active');
end.

Python Example

from py_astealth.stealth_enums import Global

if GetGlobal(Global.Stealth, 'FollowMode') == '1':
    AddToSystemJournal('Follow mode is active')

See Also

SetGlobal, Global enum