# User Data (Sound)
Grammar — User Data (userType, instance, field, index)
Flags —Native
|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 Typestring
<userinstance> — Instancestring
<userfield> — Fieldint
— Index
Returns — string
<gamelink::Sound>
native string UserDataGetSound(
string inType,
string inInstance,
string inField,
int inIndex,
);
# Related
Category: User Data / Get Value
- Load User Data Value Into Variable
- User Data (Ability Command) —
abilcmd
— UserDataGetAbilCmd - User Data (Actor) —
string
<gamelink::Actor> — UserDataGetActor - User Data (Color) —
color
— UserDataGetColor - User Data (Compare) —
int
<preset::UserDataCompare> — UserDataGetCompare - User Data (Game Link) —
string
<gamelink> — UserDataGetGameLink - User Data (Image) —
string
<filepath> — UserDataGetImagePath - User Data (Image Edge) —
int
<preset::TextTagEdge> — UserDataGetImageEdge - User Data (Image Attach) —
string
<preset::AttachPoints> — UserDataGetImageAttachPoint - User Data (Integer) —
int
— UserDataGetInt - User Data (Model) —
string
<gamelink::Model> — UserDataGetModel - User Data (Movie) —
string
<filepath> — UserDataGetMovie - User Data (Real) —
fixed
— UserDataGetFixed - User Data (Sound) —
string
<gamelink::Sound> — UserDataGetSound - User Data (String) —
string
— UserDataGetString - User Data (Text) —
text
— UserDataGetText - User Data (Unit) —
string
<gamelink::Unit> — UserDataGetUnit - User Data (Upgrade) —
string
<gamelink::Upgrade> — UserDataGetUpgrade - User Data (User Type) —
string
<gamelink::User> — UserDataGetUserType - User Data (User Instance) —
string
<userinstance> — UserDataGetUserInstance
# Examples
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNovC.galaxy:1928
}
return UserDataGetSound("CampaignPerk", lp_campaignPerk, "UISound", 1);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:30543
lv_herorevivesoundinstance = UserDataInstance(auto5BDC1380_userType, auto5BDC1380_i);
if ((UserDataGetUnit("HeroReviveSounds", lv_herorevivesoundinstance, "HeroUnit", 1) == UnitGetType(lv_herounit)) && ((UserDataGetUpgrade("HeroReviveSounds", lv_herorevivesoundinstance, "RequiredUpgrade", 1) == null) || (TechTreeUpgradeCount(lv_owner, UserDataGetUpgrade("HeroReviveSounds", lv_herorevivesoundinstance, "RequiredUpgrade", 1), c_techCountCompleteOnly) > 0))) {
libCOMI_gf_CM_HeroReviveQueue_PlaySound(SoundLink(UserDataGetSound("HeroReviveSounds", lv_herorevivesoundinstance, "HeroSound", 1), c_soundIndexAny), UserDataGetFixed("HeroReviveSounds", lv_herorevivesoundinstance, "HeroSoundDelay", 1), libCOOC_gf_CommanderPlayers());
break;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:1756
// Implementation
lv_vOSound = UserDataGetSound("PlayerCommanders", lp_commander, "StandardVO", (lp_line));
if ((lv_vOSound == null)) {
return null;
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:3211
lv_enableDisable = true;
lv_singlePlayerGroup = PlayerGroupSingle(EventPlayer());
lv_readySound = SoundLink(UserDataGetSound("PlayableLegends", libWCdr_gv_legends.lv_player[EventPlayer()].lv_selectedLegend, "ReadySound", 1), c_soundIndexAny);
// Conditions
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:3242
DialogControlSetAnimationState(libWCdr_gv_debugHeroSelectUI.lv_readyPanels[EventPlayer()].lv_readyPanel, PlayerGroupAll(), libWCdr_gv_animationStates.lv_readyState, libWCdr_gv_animationStates.lv_readyState_Ready);
if ((lv_readySound != null)) {
SoundPlayForPlayer(SoundLink(UserDataGetSound("PlayableLegends", libWCdr_gv_legends.lv_player[EventPlayer()].lv_selectedLegend, "ReadySound", 1), c_soundIndexAny), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
}