ObjVar

From Legends of Aria Admin and Modding Wiki
Revision as of 17:20, 1 November 2016 by Yorlik (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Object Variables

Object Variables are saved when a backup is performed. This means that after a full restart of the server, the GameObj will return to the state it was in during the backup.

gameObj:SetObjVar("Name", "Larry")
name = gameObj:GetObjVar("Name")
gameObj:SetObjVar("SomeObjVarNameIChose", 53.2)
aUserNum = gameObj:GetObjVar("SomeObjVarNameIChose")

You can save Numbers, Strings, Bools, Game Objects, Loc Vectors, DateTime Objects, TimeSpan Objects, and Tables in an ObjVar and can specify any String name of your choice.