# Reset User Data Instance
Grammar — Reset all user data for userType: instance
Flags —Native
|Action
Resets all values in the given instance to the defaults defined in the Data module.
# Arguments
string
<gamelink::User> — User Typestring
<userinstance> — Instance
Returns — void
native void UserDataResetInstance(
string inType,
string inInstance,
);
# Related
Category: User Data / Utility
- Reset User Data Value —
void
— UserDataResetValue - Reset User Data Instance —
void
— UserDataResetInstance - Reset User Data Type —
void
— UserDataResetType - Reset All User Data —
void
— UserDataResetAll - User Type From Reference —
string
<gamelink::User> — UserDataTypeFromReference - User Instance From Reference —
string
<userinstance> — UserDataInstanceFromReference
# Examples
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:5973
lv_indexObjective = CatalogEntryGet(c_gameCatalogObjective, autoFF84D179_ai);
if ((libSwaC_gf_MissionObjectiveIsPrimary(lv_indexObjective) == false)) {
UserDataResetInstance("MissionObjective", libSwaC_gf_ZS_ObjectiveUserDataInstance(lv_indexObjective));
UserDataLoadInstance("MissionObjective", libSwaC_gf_ZS_ObjectiveUserDataInstance(lv_indexObjective), lp_sourceBank, lv__SectionName);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:3587
auto26C5E377_ai = auto26C5E377_ai + 1;
if ((libVoiC_gf_MissionObjectiveIsPrimary(lv_indexObjective) == false)) {
UserDataResetInstance("MissionObjective", libVoiC_gf_PS_ObjectiveUserDataInstance(lv_indexObjective));
UserDataLoadInstance("MissionObjective", libVoiC_gf_PS_ObjectiveUserDataInstance(lv_indexObjective), lp_sourceBank, lv__SectionName);
}
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:1323
autoBA87C4B8_ai = autoBA87C4B8_ai + 1;
if ((libComC_gf_MissionObjectiveIsPrimary(lv_indexObjective) == false)) {
UserDataResetInstance("MissionObjective", libComC_gf_CC_ObjectiveUserDataInstance(lv_indexObjective));
UserDataLoadInstance("MissionObjective", libComC_gf_CC_ObjectiveUserDataInstance(lv_indexObjective), lp_sourceBank, lv__SectionName);
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNovC.galaxy:1776
}
UserDataResetInstance("CampaignTechItem", lv_indexTechItem);
}
}
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:4545
lv_indexObjective = CatalogEntryGet(c_gameCatalogObjective, autoFF84D179_ai);
if ((libA3DDD02B_gf_MissionObjectiveIsPrimary(lv_indexObjective) == false)) {
UserDataResetInstance("MissionObjective", libA3DDD02B_gf_PP_ObjectiveUserDataInstance(lv_indexObjective));
UserDataLoadInstance("MissionObjective", libA3DDD02B_gf_PP_ObjectiveUserDataInstance(lv_indexObjective), lp_sourceBank, lv__SectionName);
}