# Add Player Response

Grammar — Add Response - response to Player player.
FlagsNative | Action

Adds the specified player response to the Player. Player response is player based unit damage/death response.

# Arguments

  • int — Player
  • string<gamelink::PlayerResponse> — Response

Returns — void

native void PlayerAddResponse(int player, string response);

Category: Player / Player Settings

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:3838


    if ((UserDataGetInt("PlayerResponse", lp_response, "Self", 1) == 1)) {
        PlayerAddResponse(lp_player, UserDataGetGameLink("PlayerResponse", lp_response, "Response", 1));
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:3849

            lv_ally = PlayerGroupNextPlayer(auto9B0ABC36_g, lv_ally);
            if (lv_ally < 0) { break; }
            PlayerAddResponse(lv_ally, UserDataGetGameLink("PlayerResponse", lp_response, "Response", 1));
        }
    }

mods/warcoop/legends/gromhellscream.sc2modbase.sc2data/LibLGrm.galaxy:86

        lv_player = PlayerGroupNextPlayer(auto5A10EB2C_g, lv_player);
        if (lv_player < 0) { break; }
        PlayerAddResponse(lv_player, "ShamanGromSoulStealOnDeath");
    }
    return true;

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:1712

                    lv_playerresponse = CatalogFieldValueGet(c_gameCatalogArtifact,auto159B5369_entry,auto159B5369_fieldPath+"["+IntToString(auto159B5369_i)+"]",auto159B5369_player);
                    if ((CatalogEntryIsValid(c_gameCatalogPlayerResponse, lv_upgrade) == true)) {
                        PlayerAddResponse(lv_legendplayer, (lv_playerresponse));
                    }