# Button Pressed

Grammar — Button Pressed
FlagsNative | Function

Returns the button pressed. Use in response to a “Button Pressed” event.

Returns — string<gamelink::Button>

native string EventButtonPressed();

# Supported triggers

Category: UI / Input

# Examples

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:7000

    }

    if ((EventButtonPressed() == "TerranBuild")) {
        if ((gv_terranMakeSupplyBuildMenuPressed == false)) {
            gv_terranMakeSupplyBuildMenuPressed = true;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:7015

    else {
    }
    if ((EventButtonPressed() == "Cancel")) {
        if ((gv_terranMakeSupplyBuildMenuPressed == true)) {
            gv_terranMakeSupplyBuildMenuPressed = false;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:8137

    }

    if ((EventButtonPressed() == "TerranBuild")) {
        if ((gv_terranMakeBarracksBuildMenuPressed == false)) {
            gv_terranMakeBarracksBuildMenuPressed = true;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:8152

    else {
    }
    if ((EventButtonPressed() == "Cancel")) {
        if ((gv_terranMakeBarracksBuildMenuPressed == true)) {
            gv_terranMakeBarracksBuildMenuPressed = false;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:11244

    }

    if ((EventButtonPressed() == "ZergBuild")) {
        if ((gv_zergMakeSpawningPoolBuildMenuPressed == false)) {
            gv_zergMakeSpawningPoolBuildMenuPressed = true;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:11259

    else {
    }
    if ((EventButtonPressed() == "Cancel")) {
        if ((gv_zergMakeSpawningPoolBuildMenuPressed == true)) {
            gv_zergMakeSpawningPoolBuildMenuPressed = false;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:12438

    }

    if ((EventButtonPressed() == "ZergBuild")) {
        if ((gv_zergMakeExtractorBuildMenuPressed == false)) {
            gv_zergMakeExtractorBuildMenuPressed = true;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:12453

    else {
    }
    if ((EventButtonPressed() == "Cancel")) {
        if ((gv_zergMakeExtractorBuildMenuPressed == true)) {
            gv_zergMakeExtractorBuildMenuPressed = false;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:13426

    }

    if ((EventButtonPressed() == "ZergBuild")) {
        if ((gv_zergMakeRoachWarrenBuildMenuPressed == false)) {
            gv_zergMakeRoachWarrenBuildMenuPressed = true;

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:13441

    else {
    }
    if ((EventButtonPressed() == "Cancel")) {
        if ((gv_zergMakeRoachWarrenBuildMenuPressed == true)) {
            gv_zergMakeRoachWarrenBuildMenuPressed = false;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:7000

    }

    if ((EventButtonPressed() == "TerranBuild")) {
        if ((gv_terranMakeSupplyBuildMenuPressed == false)) {
            gv_terranMakeSupplyBuildMenuPressed = true;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:7015

    else {
    }
    if ((EventButtonPressed() == "Cancel")) {
        if ((gv_terranMakeSupplyBuildMenuPressed == true)) {
            gv_terranMakeSupplyBuildMenuPressed = false;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:8137

    }

    if ((EventButtonPressed() == "TerranBuild")) {
        if ((gv_terranMakeBarracksBuildMenuPressed == false)) {
            gv_terranMakeBarracksBuildMenuPressed = true;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:8152

    else {
    }
    if ((EventButtonPressed() == "Cancel")) {
        if ((gv_terranMakeBarracksBuildMenuPressed == true)) {
            gv_terranMakeBarracksBuildMenuPressed = false;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:11244

    }

    if ((EventButtonPressed() == "ZergBuild")) {
        if ((gv_zergMakeSpawningPoolBuildMenuPressed == false)) {
            gv_zergMakeSpawningPoolBuildMenuPressed = true;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:11259

    else {
    }
    if ((EventButtonPressed() == "Cancel")) {
        if ((gv_zergMakeSpawningPoolBuildMenuPressed == true)) {
            gv_zergMakeSpawningPoolBuildMenuPressed = false;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:12438

    }

    if ((EventButtonPressed() == "ZergBuild")) {
        if ((gv_zergMakeExtractorBuildMenuPressed == false)) {
            gv_zergMakeExtractorBuildMenuPressed = true;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:12453

    else {
    }
    if ((EventButtonPressed() == "Cancel")) {
        if ((gv_zergMakeExtractorBuildMenuPressed == true)) {
            gv_zergMakeExtractorBuildMenuPressed = false;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:13426

    }

    if ((EventButtonPressed() == "ZergBuild")) {
        if ((gv_zergMakeRoachWarrenBuildMenuPressed == false)) {
            gv_zergMakeRoachWarrenBuildMenuPressed = true;

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2mapMapScript.galaxy:13441

    else {
    }
    if ((EventButtonPressed() == "Cancel")) {
        if ((gv_zergMakeRoachWarrenBuildMenuPressed == true)) {
            gv_zergMakeRoachWarrenBuildMenuPressed = false;