# Player Can Create Effect On Unit

Grammar — Player player can create effect on target
FlagsFunction

Returns true if the specified player can execute the specified effect on the specified unit.

# Arguments

  • int — Player
  • string<gamelink::Effect> — Effect
  • unit — Target

Returns — bool

bool libNtve_gf_PlayerCanCreateEffectOnUnit(
	int lp_player,
	string lp_effect,
	unit lp_target,
);

Category: Environment / Effects

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:16876


    Wait(0.0625, c_timeGame);
    if ((libNtve_gf_PlayerCanCreateEffectOnUnit(1, "TargetIsBeingDraggedByDehaka", lv_targetUnit) == false)) {
        ActorSend(libNtve_gf_MainActorofUnit(lv_targetUnit), "HostSiteOpsSet ::Host");
        ActorSend(libNtve_gf_MainActorofUnit(lv_targetUnit), "RefClear ::Host");