class EnScriptSource
Part of Enforce script essentials
Constructors 2
private void EnScript()private void ~EnScript()Methods 4
Dynamic read of variable value by its name
inst- When inst == NULL, it's for global variable, otherwise it's class member
index- Is index when variable is array
- out
result - Variable must be of the same type!
Returns: int true when success
float count = 0;
bool success = EnScript.GetClassVar(myClass, "m_Counter", 0, count);
Print(count);
Print(success);
>> count = 5
>> success = 1Dynamic write to variable by its name
inst- when inst == NULL, it's for global variable, otherwise it's class member
varnameindex- Is index when variable is array
input- Input variable must be of the same type!
Returns: int Returns true(1) when success
Print(myClass.m_Counter);
>> m_Counter = 0
bool success = EnScript.SetClassVar(myClass, "m_Counter", 0, 5.0);
Print(myClass.m_Counter);
Print(success);
>> m_Counter = 5
>> success = 1Sets variable value by value in string
- out
var value
Returns: int
???