# Validate Unit Can Create Effect On Unit

Grammar — Validate caster can create effect on unit
FlagsNative | Function | Internal

# Arguments

  • unit — Caster
  • string<gamelink::Effect> — Effect
  • unit — Target

Returns — int

native int UnitValidateEffectUnit(
	unit inUnit,
	string inEffect,
	unit inTarget,
);

Category: Environment / Effects / Internal

# Examples

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

    // Automatic Variable Declarations
    // Implementation
    return (UnitValidateEffectUnit(lp_caster, lp_effect, lp_target) == 0);
}

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

    // Automatic Variable Declarations
    // Implementation
    return (UnitValidateEffectUnit(lp_caster, lp_effect, lp_target) == 0);
}

mods/warcoop/warclassicsystem.sc2modbase.sc2data/TriggerLibs/Tactical/TacticalAIWar3.galaxy:73

    //Scroll of Regeneration
    if(!AIUnitIsInCombat(aiUnit)){
        if(UnitValidateEffectUnit(aiUnit,c_IT_ScrollofRegenerationAIValidateEffect,aiUnit)==0){
            itemType=c_IT_ScrollofRegenerationAI;
            ord=AICreateItemOrder(player,aiUnit,itemType,c_abilInventoryCmdItemInstant);

mods/warcoop/warmeleeai.sc2modbase.sc2data/TriggerLibs/MeleeWaveAI.galaxy:114

}
bool GAw3_UnitAttackAir(unit u){
	return UnitValidateEffectUnit(u,"Unit_ATTACKS_FLYING",u)>0;
}
bool GAw3_PlayerAllowAirCreep(int player){