# Set Dialog Item Behavior

Grammar — Set dialogItem behavior to behavior for players
FlagsAction

This sets the behavior for the dialog item. Supported for Dialog Items of type Unit Status Duration Bar

# Arguments

  • int<control> — Dialog Item
  • string<gamelink::Behavior> — Behavior
  • playergroup — Players

Returns — void

void libNtve_gf_SetDialogItemBehavior(
	int lp_dialogItem,
	string lp_behavior,
	playergroup lp_players,
);

Category: Dialog / Dialog Item Tools

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:2390

        else {
        }
        libNtve_gf_SetDialogItemBehavior(lv_behaviorDuration, lp_behavior, libCore_gv_playerGroupFromPlayer[lp_player]);
        libNtve_gf_SetDialogItemText(lv_behaviorLabel, StringExternal(CatalogFieldValueGet(c_gameCatalogBehavior, lp_behavior, "Name", c_playerAny)), libCore_gv_playerGroupFromPlayer[lp_player]);
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:4195

    if ((lp_newBehavior == "Dead")) {
        libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lv_player] = lp_newBehavior;
        libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
        libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarRightBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarDescriptionLabel, StringExternal("Param/Value/lib_UIUI_5CE53894"), libCore_gv_playerGroupFromPlayer[lv_player]);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:4196

        libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lv_player] = lp_newBehavior;
        libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
        libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarRightBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarDescriptionLabel, StringExternal("Param/Value/lib_UIUI_5CE53894"), libCore_gv_playerGroupFromPlayer[lv_player]);
        libNtve_gf_SetDialogItemImage(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarIcon, "@UI/HUD_Bar_DeathStun_Icon_Stun", libCore_gv_playerGroupFromPlayer[lv_player]);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:4203

        if ((lp_newBehavior == "GuldanDarkBargainDuration")) {
            libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lv_player] = lp_newBehavior;
            libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
            libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarRightBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarDescriptionLabel, StringExternal("Param/Value/lib_UIUI_A7D5AC14"), libCore_gv_playerGroupFromPlayer[lv_player]);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:4204

            libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lv_player] = lp_newBehavior;
            libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
            libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarRightBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
            libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarDescriptionLabel, StringExternal("Param/Value/lib_UIUI_A7D5AC14"), libCore_gv_playerGroupFromPlayer[lv_player]);
            libNtve_gf_SetDialogItemImage(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarIcon, "@UI/HUD_Bar_DeathStun_Icon_Stun", libCore_gv_playerGroupFromPlayer[lv_player]);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:4211

            if ((UnitBehaviorDuration(libGame_gv_players[lv_player].lv_unitStatusBarsMonitorUnit_StunDeath, lp_newBehavior) >= UnitBehaviorDuration(libGame_gv_players[lv_player].lv_unitStatusBarsMonitorUnit_StunDeath, libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lv_player]))) {
                libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lv_player] = lp_newBehavior;
                libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
                libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarRightBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
                libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarDescriptionLabel, StringExternal("Param/Value/lib_UIUI_33824A8F"), libCore_gv_playerGroupFromPlayer[lv_player]);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:4212

                libUIUI_gv_heroConsoleUnitStatusBars_StunDeathBarCurrentBehaviorForPlayer[lv_player] = lp_newBehavior;
                libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
                libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarRightBar, lp_newBehavior, libCore_gv_playerGroupFromPlayer[lv_player]);
                libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarDescriptionLabel, StringExternal("Param/Value/lib_UIUI_33824A8F"), libCore_gv_playerGroupFromPlayer[lv_player]);
                libNtve_gf_SetDialogItemImage(libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarIcon, (CatalogFieldValueGet(c_gameCatalogBehavior, lp_newBehavior, "InfoIcon", c_playerAny)), libCore_gv_playerGroupFromPlayer[lv_player]);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:4282


        libUIUI_gv_heroConsoleUnitStatusBars_BehaviorChannelBarCurrentBehaviorForPlayer[lp_player] = lp_behavior;
        libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarDurationBar, lp_behavior, libCore_gv_playerGroupFromPlayer[lp_player]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarBehaviorLabel, StringExternal(CatalogFieldValueGet(c_gameCatalogBehavior, lp_behavior, "Name", c_playerAny)), libCore_gv_playerGroupFromPlayer[lp_player]);
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:4304


        libUIUI_gv_heroConsoleUnitStatusBars_BehaviorChannelBarCurrentBehaviorForPlayerRight[lp_player] = lp_behavior;
        libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarDurationBarRight, lp_behavior, libCore_gv_playerGroupFromPlayer[lp_player]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarBehaviorLabelRight, StringExternal(CatalogFieldValueGet(c_gameCatalogBehavior, lp_behavior, "Name", c_playerAny)), libCore_gv_playerGroupFromPlayer[lp_player]);
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:4322

    if ((UnitBehaviorDuration(lv_heroUnit, lp_behavior) >= UnitBehaviorDuration(lv_heroUnit, libUIUI_gv_heroConsoleUnitStatusBars_BehaviorChannelBarCurrentBehaviorForPlayer[lp_player]))) {
        libUIUI_gv_heroConsoleUnitStatusBars_BehaviorChannelBarCurrentBehaviorForPlayer[lp_player] = lp_behavior;
        libNtve_gf_SetDialogItemBehavior(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarDurationBar, lp_behavior, libCore_gv_playerGroupFromPlayer[lp_player]);
        libNtve_gf_SetDialogItemText(libUIUI_gv_heroConsoleUnitStatusBars.lv_behaviorChannelBarBehaviorLabel, StringExternal(CatalogFieldValueGet(c_gameCatalogBehavior, lp_behavior, "Name", c_playerAny)), libCore_gv_playerGroupFromPlayer[lp_player]);
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:12679

    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarParentFrame = DialogControlLastCreated();
    DialogControlHookup(lv_panels[lv_currentPanelLayer], c_triggerControlTypeUnitStatusDurationBar, "UnitStatusDurationBarLeft");
    libNtve_gf_SetDialogItemBehavior(DialogControlLastCreated(), "Dead", PlayerGroupAll());
    DialogControlSetObservedType(DialogControlLastCreated(), c_triggerObservedTypeObservedPlayerId);
    libUIUI_gv_heroConsoleUnitStatusBars.lv_stunDeathBarLeftBar = DialogControlLastCreated();