# Reset User Data Instance

Grammar — Reset all user data for userType: instance
FlagsNative | Action

Resets all values in the given instance to the defaults defined in the Data module.

# Arguments

  • string<gamelink::User> — User Type
  • string<userinstance> — Instance

Returns — void

native void UserDataResetInstance(
	string inType,
	string inInstance,
);

Category: User Data / Utility

# Examples

campaigns/swarmstory.sc2campaignbase.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.sc2campaignbase.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.sc2modbase.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.sc2modbase.sc2data/LibNovC.galaxy:1776

        }

        UserDataResetInstance("CampaignTechItem", lv_indexTechItem);
    }
}

mods/voidprologue.sc2modbase.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);
                }