# Power Is Provided By

Grammar — Power is provided for inPlayer at inPosition with inType by inSource, with inMinLevel
FlagsNative | Function

Returns true if power is provided to a point by a specific unit. Note: The Minimum Power parameter should not be set past 1, unless you have custom units that provide more than a single power level.

# Arguments

  • int — Player
  • point — Position
  • string — Type
  • unit — Source
  • int — Minimum Level

Returns — bool

native bool PowerIsProvidedBy(
	int inPlayer,
	point inPos,
	string inLink,
	unit inSource,
	int inMinLevel,
);

Category: Environment / Creep And Power

# Examples

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/paiur05.sc2map/MapScript.galaxy:724

        Wait(0.5, c_timeAI);
    }
    while ((libVCMI_gf_GameIsOver() == false) && (PowerIsProvidedBy(lp_player, lp_targetLoc, "PowerSource", lv_warpPrismUnit, 1) == false)) {
        UnitIssueOrder(lv_warpPrismUnit, Order(AbilityCommand("PhasingMode", 0)), c_orderQueueReplace);
        Wait(0.5, c_timeAI);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur05.sc2mapMapScript.galaxy:724

        Wait(0.5, c_timeAI);
    }
    while ((libVCMI_gf_GameIsOver() == false) && (PowerIsProvidedBy(lp_player, lp_targetLoc, "PowerSource", lv_warpPrismUnit, 1) == false)) {
        UnitIssueOrder(lv_warpPrismUnit, Order(AbilityCommand("PhasingMode", 0)), c_orderQueueReplace);
        Wait(0.5, c_timeAI);