Closed svencc closed 2 years ago
set3DENAttribute
? No, these are not saved by default. If you would save them in a variable, there is also no easy way to restore them on mission load, because there are no events fired by grad-persistence that you could hook into.
@McDiod Sorry my mistake!
I meant the variables which are set/get via setVariable/getVariable.
Those are supported (see saving variables in the Wiki).
So e.g. if you are using this setVariable ["svencc_soldierIsCool",false,true]
on an AI soldier, you have to create a grad-persistence variable config with namespace "unit".
So I need to configure those CfgGradPersistence class and need to add each single variable which do exist on any Unit?
class CfgGradPersistence {
class customVariables {
class var1 {
varName = "isHVT"; <-- this name needs to be the same as the actual variable name on an entity?
varNamespace = "unit";
public = 1;
};
};
};
In the above example: Will the variable "anyUnit setVariable["isHVT",true]" be persisted on ALL units (which have this variable set)?
So I need to configure those CfgGradPersistence class and need to add each single variable which do exist on any Unit?
yes
varName = "isHVT"; <-- this name needs to be the same as the actual variable name on an entity?
yes
In the above example: Will the variable "anyUnit setVariable["isHVT",true]" be persisted on ALL units (which have this variable set)?
All AI units, yes. For player units, use varNamespace = "player";
. Also make sure the variable you want to save is known to the server.
Thanks a lot!
Can I find you on the GRUPPE ADLER discord?
Thanks a lot!
Can I find you on the GRUPPE ADLER discord?
yes, McDiod#9647
Are Entity Attributes (via setAttribute) are also be saved? Or do I have to persist those Information via global variables?