# Height Of Point

Grammar — Height of p
FlagsNative | Function

Returns the height of the specified point, relative to the terrain, as a real value. To place a point with a non-zero height in the Terrain Editor, use the Three Dimensional point type.

# Arguments

  • point — Point

Returns — fixed

native fixed PointGetHeight(point p);

Category: Point / Measurements

# Examples

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstoryexpedition.sc2map/MapScript.galaxy:165

    lib281DEC45_gf_StoryCreateSetUnit("SMX1KaldrSet02", UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation"), 270.0);
    gv_uNITSETKaldir02 = UnitLastCreated();
    UnitSetHeight(gv_uNITSETKaldir02, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation")), 0.0);
    lib281DEC45_gf_CreateStoryCharacter("Hotspot - Expedition - Hatchery", "SMX1KaldrSet01", UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation 01"));
    UnitSetHeight(lib281DEC45_gf_CharacterUnit("Hotspot - Expedition - Hatchery"), PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation 01")), 0.0);

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstoryexpedition.sc2map/MapScript.galaxy:167

    UnitSetHeight(gv_uNITSETKaldir02, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation")), 0.0);
    lib281DEC45_gf_CreateStoryCharacter("Hotspot - Expedition - Hatchery", "SMX1KaldrSet01", UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation 01"));
    UnitSetHeight(lib281DEC45_gf_CharacterUnit("Hotspot - Expedition - Hatchery"), PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation 01")), 0.0);
    lib281DEC45_gf_StoryCreateSetUnit("SMX1LeviathanSet", lib281DEC45_gf_StoryModeDefaultPosition(), 270.0);
    gv_uNITSETLeviathan00 = UnitLastCreated();

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstoryhybrid.sc2map/MapScript.galaxy:151

        lib281DEC45_gf_StoryCreateSetUnit("SMX1_MobiusSet_Dusk03", UnitGetAttachmentPoint(gv_uNITSETDusk00, "Pos_SetLocation"), 270.0);
        gv_uNITSETDusk03 = UnitLastCreated();
        UnitSetHeight(gv_uNITSETDusk03, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETDusk00, "Pos_SetLocation")), 0.0);
        lib281DEC45_gf_CreateStoryCharacter("Hotspot - Hybrid - Station", "SMX1_MobiusSet_Dusk02", lib281DEC45_gf_StoryModeDefaultPosition());
        lib281DEC45_gf_StoryAddAliasedUnit(gv_uNITSETDusk00, "ZSMStorySet");

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstoryspace.sc2map/MapScript.galaxy:145

    lib281DEC45_gf_StoryCreateSetUnit("SMX1DominionSpaceSet", UnitGetAttachmentPoint(gv_uNITSETSpace02, "Pos_SetLocation"), 270.0);
    gv_uNITSETSpace00 = UnitLastCreated();
    UnitSetHeight(gv_uNITSETSpace00, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETSpace02, "Pos_SetLocation")), 0.0);
    lib281DEC45_gf_StoryCreateSetUnit("SMX1LeviathanSet", lib281DEC45_gf_StoryModeDefaultPosition(), 270.0);
    gv_uNITSETLeviathan00 = UnitLastCreated();

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstoryzerus.sc2map/MapScript.galaxy:141

    lib281DEC45_gf_StoryCreateSetUnit("SMX1_ZerusSet_05", UnitGetAttachmentPoint(gv_uNITSETZerus00, "Pos_SetLocation"), 270.0);
    gv_uNITSETZerus05 = UnitLastCreated();
    UnitSetHeight(gv_uNITSETZerus05, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETZerus00, "Pos_SetLocation")), 0.0);
    lib281DEC45_gf_StoryCreateSetUnit("SMX1_ZerusSet_06", UnitGetAttachmentPoint(gv_uNITSETZerus00, "Pos_SetLocation"), 270.0);
    gv_uNITSETZerus06 = UnitLastCreated();

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstoryzerus.sc2map/MapScript.galaxy:144

    lib281DEC45_gf_StoryCreateSetUnit("SMX1_ZerusSet_06", UnitGetAttachmentPoint(gv_uNITSETZerus00, "Pos_SetLocation"), 270.0);
    gv_uNITSETZerus06 = UnitLastCreated();
    UnitSetHeight(gv_uNITSETZerus06, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETZerus00, "Pos_SetLocation")), 0.0);
    lib281DEC45_gf_StoryCreateSetUnit("SMX1LeviathanSet", lib281DEC45_gf_StoryModeDefaultPosition(), 270.0);
    gv_uNITSETLeviathan00 = UnitLastCreated();

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryexpedition.sc2mapMapScript.galaxy:165

    lib281DEC45_gf_StoryCreateSetUnit("SMX1KaldrSet02", UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation"), 270.0);
    gv_uNITSETKaldir02 = UnitLastCreated();
    UnitSetHeight(gv_uNITSETKaldir02, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation")), 0.0);
    lib281DEC45_gf_CreateStoryCharacter("Hotspot - Expedition - Hatchery", "SMX1KaldrSet01", UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation 01"));
    UnitSetHeight(lib281DEC45_gf_CharacterUnit("Hotspot - Expedition - Hatchery"), PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation 01")), 0.0);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryexpedition.sc2mapMapScript.galaxy:167

    UnitSetHeight(gv_uNITSETKaldir02, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation")), 0.0);
    lib281DEC45_gf_CreateStoryCharacter("Hotspot - Expedition - Hatchery", "SMX1KaldrSet01", UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation 01"));
    UnitSetHeight(lib281DEC45_gf_CharacterUnit("Hotspot - Expedition - Hatchery"), PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETKaldir, "Pos_SetLocation 01")), 0.0);
    lib281DEC45_gf_StoryCreateSetUnit("SMX1LeviathanSet", lib281DEC45_gf_StoryModeDefaultPosition(), 270.0);
    gv_uNITSETLeviathan00 = UnitLastCreated();

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryhybrid.sc2mapMapScript.galaxy:151

        lib281DEC45_gf_StoryCreateSetUnit("SMX1_MobiusSet_Dusk03", UnitGetAttachmentPoint(gv_uNITSETDusk00, "Pos_SetLocation"), 270.0);
        gv_uNITSETDusk03 = UnitLastCreated();
        UnitSetHeight(gv_uNITSETDusk03, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETDusk00, "Pos_SetLocation")), 0.0);
        lib281DEC45_gf_CreateStoryCharacter("Hotspot - Hybrid - Station", "SMX1_MobiusSet_Dusk02", lib281DEC45_gf_StoryModeDefaultPosition());
        lib281DEC45_gf_StoryAddAliasedUnit(gv_uNITSETDusk00, "ZSMStorySet");

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryspace.sc2mapMapScript.galaxy:145

    lib281DEC45_gf_StoryCreateSetUnit("SMX1DominionSpaceSet", UnitGetAttachmentPoint(gv_uNITSETSpace02, "Pos_SetLocation"), 270.0);
    gv_uNITSETSpace00 = UnitLastCreated();
    UnitSetHeight(gv_uNITSETSpace00, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETSpace02, "Pos_SetLocation")), 0.0);
    lib281DEC45_gf_StoryCreateSetUnit("SMX1LeviathanSet", lib281DEC45_gf_StoryModeDefaultPosition(), 270.0);
    gv_uNITSETLeviathan00 = UnitLastCreated();

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryzerus.sc2mapMapScript.galaxy:141

    lib281DEC45_gf_StoryCreateSetUnit("SMX1_ZerusSet_05", UnitGetAttachmentPoint(gv_uNITSETZerus00, "Pos_SetLocation"), 270.0);
    gv_uNITSETZerus05 = UnitLastCreated();
    UnitSetHeight(gv_uNITSETZerus05, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETZerus00, "Pos_SetLocation")), 0.0);
    lib281DEC45_gf_StoryCreateSetUnit("SMX1_ZerusSet_06", UnitGetAttachmentPoint(gv_uNITSETZerus00, "Pos_SetLocation"), 270.0);
    gv_uNITSETZerus06 = UnitLastCreated();

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryzerus.sc2mapMapScript.galaxy:144

    lib281DEC45_gf_StoryCreateSetUnit("SMX1_ZerusSet_06", UnitGetAttachmentPoint(gv_uNITSETZerus00, "Pos_SetLocation"), 270.0);
    gv_uNITSETZerus06 = UnitLastCreated();
    UnitSetHeight(gv_uNITSETZerus06, PointGetHeight(UnitGetAttachmentPoint(gv_uNITSETZerus00, "Pos_SetLocation")), 0.0);
    lib281DEC45_gf_StoryCreateSetUnit("SMX1LeviathanSet", lib281DEC45_gf_StoryModeDefaultPosition(), 270.0);
    gv_uNITSETLeviathan00 = UnitLastCreated();

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

        libNtve_gf_CreateUnitsAtPoint2(1, lv_eggUnitType, c_unitCreateIgnorePlacement, 1, lv_eggLocation);
        lv_eggUnit = UnitLastCreated();
        UnitSetHeight(UnitLastCreated(), PointGetHeight(lv_eggLocation), 0.0);
        UnitGroupAdd(libSwaC_gv_zS_ArmyCustomEggUnits, UnitLastCreated());
        UnitSetState(UnitLastCreated(), c_unitStateStatusBar, false);

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

        UnitCreate(1, lv_unitType, c_unitCreateIgnorePlacement, 0, lv_offset, PointGetFacing(lv_offset));
        libSwaC_gv_zS_ArmyCustomEvolutionUnitA = UnitLastCreated();
        UnitSetPropertyFixed(UnitLastCreated(), c_unitPropHeight, PointGetHeight(lv_offset));
        UnitSetState(UnitLastCreated(), c_unitStateCursorable, true);
        UnitSetState(UnitLastCreated(), c_unitStateHighlightable, true);

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

        UnitCreate(1, lv_unitType, c_unitCreateIgnorePlacement, 0, lv_offset, PointGetFacing(lv_offset));
        libSwaC_gv_zS_ArmyCustomEvolutionUnitB = UnitLastCreated();
        UnitSetPropertyFixed(UnitLastCreated(), c_unitPropHeight, PointGetHeight(lv_offset));
        UnitSetState(UnitLastCreated(), c_unitStateCursorable, true);
        UnitSetState(UnitLastCreated(), c_unitStateHighlightable, true);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pstory01.sc2map/MapScript.galaxy:714

    libVCST_gf_AddRemoveUnitForRoom(true, gv_uNITSolarCoreSet02, libVCST_ge_Rooms_StoryRoomShip);
    libVCST_gf_ShowHideUnitAbs(true, gv_uNITSolarCoreSet02);
    libVCST_gf_StoryCreateUnit("SMX2_ShipRoomSet_Wings", libNtve_gf_PointFromXYZ((PointGetX(libVCST_gf_StoryModeDefaultPosition())+-0.8001), (PointGetY(libVCST_gf_StoryModeDefaultPosition())+-5.0749), (PointGetHeight(libVCST_gf_StoryModeDefaultPosition())+4.3524)), 90.0);
    gv_uNITSolarCoreSetWings = UnitLastCreated();
    libVCST_gf_AddRemoveUnitForRoom(true, gv_uNITSolarCoreSetWings, libVCST_ge_Rooms_StoryRoomShip);

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pstory01.sc2map/MapScript.galaxy:1026

            libVCST_gf_StorySetUnitLocation(libVCST_gf_ClickableUnit("AmonPreserver"), UnitGetAttachmentPoint(gv_uNITWarCouncilSet00, "Pos_EvolutionMaster"));
            if ((UserDataGetInt("Clickable", "AmonPreserver", "New", 1) == 1)) {
                libVCST_gf_StorySetUnitLocation(libVCST_gf_ClickableUnit("AmonPreserver"), libNtve_gf_PointWithZOffset(UnitGetAttachmentPoint(gv_uNITWarCouncilSet00, "Pos_EvolutionMaster"), (PointGetHeight(UnitGetAttachmentPoint(gv_uNITWarCouncilSet00, "Pos_EvolutionMaster")) + 0.03)));
                UnitSetFacing(libVCST_gf_ClickableUnit("AmonPreserver"), PointGetFacing(UnitGetAttachmentPoint(gv_uNITWarCouncilSet00, "Pos_EvolutionMaster")), 0.0);
                libVCST_gf_TurnAnimationPropertiesOnOff(libVCST_gf_ClickableUnit("AmonPreserver"), "GLstand Wounded", true, 0.0);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pstory01.sc2mapMapScript.galaxy:714

    libVCST_gf_AddRemoveUnitForRoom(true, gv_uNITSolarCoreSet02, libVCST_ge_Rooms_StoryRoomShip);
    libVCST_gf_ShowHideUnitAbs(true, gv_uNITSolarCoreSet02);
    libVCST_gf_StoryCreateUnit("SMX2_ShipRoomSet_Wings", libNtve_gf_PointFromXYZ((PointGetX(libVCST_gf_StoryModeDefaultPosition())+-0.8001), (PointGetY(libVCST_gf_StoryModeDefaultPosition())+-5.0749), (PointGetHeight(libVCST_gf_StoryModeDefaultPosition())+4.3524)), 90.0);
    gv_uNITSolarCoreSetWings = UnitLastCreated();
    libVCST_gf_AddRemoveUnitForRoom(true, gv_uNITSolarCoreSetWings, libVCST_ge_Rooms_StoryRoomShip);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pstory01.sc2mapMapScript.galaxy:1026

            libVCST_gf_StorySetUnitLocation(libVCST_gf_ClickableUnit("AmonPreserver"), UnitGetAttachmentPoint(gv_uNITWarCouncilSet00, "Pos_EvolutionMaster"));
            if ((UserDataGetInt("Clickable", "AmonPreserver", "New", 1) == 1)) {
                libVCST_gf_StorySetUnitLocation(libVCST_gf_ClickableUnit("AmonPreserver"), libNtve_gf_PointWithZOffset(UnitGetAttachmentPoint(gv_uNITWarCouncilSet00, "Pos_EvolutionMaster"), (PointGetHeight(UnitGetAttachmentPoint(gv_uNITWarCouncilSet00, "Pos_EvolutionMaster")) + 0.03)));
                UnitSetFacing(libVCST_gf_ClickableUnit("AmonPreserver"), PointGetFacing(UnitGetAttachmentPoint(gv_uNITWarCouncilSet00, "Pos_EvolutionMaster")), 0.0);
                libVCST_gf_TurnAnimationPropertiesOnOff(libVCST_gf_ClickableUnit("AmonPreserver"), "GLstand Wounded", true, 0.0);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:3801

    lv_floatingText = TextExpressionAssemble("Param/Expression/lib_VCMI_6743CDD8");
    SoundPlay(SoundLink("UI_ResourcePickup", 0), PlayerGroupSingle(1), 100.0, 0.0);
    TextTagCreate(lv_floatingText, 24, lp_location, (PointGetHeight(lp_location)+2.0), true, false, PlayerGroupAll());
    TextTagSetVelocity(TextTagLastCreated(), 0.7, 90.0);
    TextTagSetBackgroundImage(TextTagLastCreated(), "Assets\\Textures\\blank.dds", true);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:1190

    libVCST_gf_ClearAnimationwithblendtime(c_animNameDefault, lp_unit, 0.0);
    UnitSetPosition(lp_unit, lp_point, false);
    UnitSetHeight(lp_unit, PointGetHeight(lp_point), 0.0);
    UnitSetFacing(lp_unit, PointGetFacing(lp_point), 0.0);
    UnitSetState(lp_unit, c_unitStateMoveSuppressed, true);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:1199

    // Implementation
    UnitCreate(1, lp_unitType, c_unitCreateIgnorePlacement, 0, lp_location, lp_facing);
    if ((PointGetHeight(lp_location) != 0.0)) {
        UnitSetHeight(UnitLastCreated(), PointGetHeight(lp_location), 0.0);
    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:1200

    UnitCreate(1, lp_unitType, c_unitCreateIgnorePlacement, 0, lp_location, lp_facing);
    if ((PointGetHeight(lp_location) != 0.0)) {
        UnitSetHeight(UnitLastCreated(), PointGetHeight(lp_location), 0.0);
    }

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:399

    ActorCreate(null, lp_actor, null, null, null);
    lv_a = libNtve_gf_ActorLastCreated();
    ActorSend(lv_a, libNtve_gf_SetPositionH(PointGetX(lp_position), PointGetY(lp_position), PointGetHeight(lp_position)));
    return lv_a;
}

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:414

    lv_a = libNtve_gf_ActorLastCreated();
    ActorSend(lv_a, libNtve_gf_ActorMsg1("SetPositionH", libNtve_gf_ConvertXYToString(PointGetX(lp_position), PointGetY(lp_position))));
    ActorSend(lv_a, libNtve_gf_SetHeight(PointGetHeight(lp_position)));
    return lv_a;
}

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:4007


    // Implementation
    lv_pointWithFacing = libNtve_gf_PointFromXYZ(PointGetX(lp_point), PointGetY(lp_point), PointGetHeight(lp_point));
    PointSetFacing(lv_pointWithFacing, lp_angle);
    return lv_pointWithFacing;

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:275

    ActorCreate(null, lp_actor, null, null, null);
    lv_a = libNtve_gf_ActorLastCreated();
    ActorSend(lv_a, libNtve_gf_SetPositionH(PointGetX(lp_position), PointGetY(lp_position), PointGetHeight(lp_position)));
    return lv_a;
}

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:297

    lv_a = libNtve_gf_ActorLastCreated();
    ActorSend(lv_a, libNtve_gf_ActorMsg1("SetPositionH", libNtve_gf_ConvertXYToString(PointGetX(lp_position), PointGetY(lp_position))));
    ActorSend(lv_a, libNtve_gf_SetHeight(PointGetHeight(lp_position)));
    return lv_a;
}

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:3306


    // Implementation
    lv_pointWithFacing = libNtve_gf_PointFromXYZ(PointGetX(lp_point), PointGetY(lp_point), PointGetHeight(lp_point));
    PointSetFacing(lv_pointWithFacing, lp_angle);
    return lv_pointWithFacing;

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:1083

    libComC_gf_ClearAnimationwithblendtime(c_animNameDefault, lp_unit, 0.0);
    UnitSetPosition(lp_unit, lp_point, false);
    UnitSetHeight(lp_unit, PointGetHeight(lp_point), 0.0);
    UnitSetFacing(lp_unit, PointGetFacing(lp_point), 0.0);
    UnitSetState(lp_unit, c_unitStateMoveSuppressed, true);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:1091

    // Implementation
    UnitCreate(1, lp_unitType, c_unitCreateIgnorePlacement, 0, lp_location, lp_facing);
    if ((PointGetHeight(lp_location) != 0.0)) {
        UnitSetHeight(UnitLastCreated(), PointGetHeight(lp_location), 0.0);
    }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:1092

    UnitCreate(1, lp_unitType, c_unitCreateIgnorePlacement, 0, lp_location, lp_facing);
    if ((PointGetHeight(lp_location) != 0.0)) {
        UnitSetHeight(UnitLastCreated(), PointGetHeight(lp_location), 0.0);
    }

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:3152

    TextExpressionSetToken("Param/Expression/lib_A3DDD02B_9C52A85A", "Style", StringToText((lv_fontStyle)));
    TextExpressionSetToken("Param/Expression/lib_A3DDD02B_9C52A85A", "A", lp_text);
    TextTagCreate(TextExpressionAssemble("Param/Expression/lib_A3DDD02B_9C52A85A"), 24, lp_location, (PointGetHeight(lp_location) + 1.0), true, true, PlayerGroupSingle(1));
    TextTagSetFogVisibility(TextTagLastCreated(), c_visTypeFog);
}

mods/warcoop/warclassic.sc2modbase.sc2data/TriggerLibs/WarClassic.galaxy:269

    lv_a = libNtve_gf_ActorLastCreated();
    ActorSend(lv_a, libNtve_gf_ActorMsg1("SetPositionH", libNtve_gf_ConvertXYToString(PointGetX(lp_position), PointGetY(lp_position))));
    ActorSend(lv_a, libNtve_gf_SetHeight(PointGetHeight(lp_position)));
    return lv_a;
}