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).
function GetGlobal(GlobalRegion: String; VarName: String): String;
def GetGlobal(GlobalRegion: int, VarName: str) -> str: ...
begin
if GetGlobal('stealth', 'FollowMode') = '1' then
AddToSystemJournal('Follow mode is active');
end.
from py_astealth.stealth_enums import Global
if GetGlobal(Global.Stealth, 'FollowMode') == '1':
AddToSystemJournal('Follow mode is active')