# User Data (Image Attach)

Grammar — User Data (userType, instance, field, index)
FlagsNative | Function

Returns a value from user data for the given type, instance, and field. User data is defined in the Data module.

# Arguments

  • string<gamelink::User> — User Type
  • string<userinstance> — Instance
  • string<userfield> — Field
  • int — Index

Returns — string<preset::AttachPoints>

native string UserDataGetImageAttachPoint(
	string inType,
	string inInstance,
	string inField,
	int inIndex,
);

Category: User Data / Get Value

# Examples

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:8376

    // Automatic Variable Declarations
    // Implementation
    return UserDataGetImageAttachPoint("CalloutAttachment", libSwaC_gf_ZS_ArmyCategoryCalloutAttachment(lp_armyCategory), "Attachment", 1);
}

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:8426

        DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_Callouts/UnitCalloutArmyFrameLeftTemplate");
        DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, 0, 0);
        DialogSetPositionRelativeToUnit(DialogLastCreated(), lp_attachUnit, UserDataGetImageAttachPoint("CalloutAttachment", lp_attachment, "Attachment", 1), 0, (0 - (DialogGetHeight(DialogLastCreated()) / 2)));
    }
    else {

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:8431

        DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_Callouts/UnitCalloutArmyFrameRightTemplate");
        DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, 0, 0);
        DialogSetPositionRelativeToUnit(DialogLastCreated(), lp_attachUnit, UserDataGetImageAttachPoint("CalloutAttachment", lp_attachment, "Attachment", 1), (0 - DialogGetWidth(DialogLastCreated())), (0 - (DialogGetHeight(DialogLastCreated()) / 2)));
    }
    DialogSetVisible(DialogLastCreated(), PlayerGroupAll(), true);

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:5037

                    DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_Callouts/UnitCalloutStoryFrameLeftTemplate");
                    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, 0, 0);
                    DialogSetPositionRelativeToUnit(DialogLastCreated(), lv_indexUnit, UserDataGetImageAttachPoint("CalloutAttachment", lib281DEC45_gf_ZSS_CharacterCalloutData(lp_character), "Attachment", 1), 0, (0 - (DialogGetHeight(DialogLastCreated()) / 2)));
                }
                else if (autoD3F9E7EF_val == c_textTagEdgeRight) {

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:5042

                    DialogControlCreateFromTemplate(DialogLastCreated(), c_triggerControlTypePanel, "HotS_Callouts/UnitCalloutStoryFrameRightTemplate");
                    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, 0, 0);
                    DialogSetPositionRelativeToUnit(DialogLastCreated(), lv_indexUnit, UserDataGetImageAttachPoint("CalloutAttachment", lib281DEC45_gf_ZSS_CharacterCalloutData(lp_character), "Attachment", 1), (0 - DialogGetWidth(DialogLastCreated())), (0 - (DialogGetHeight(DialogLastCreated()) / 2)));
                }
                else {