# Effect That Created Unit

Grammar — Effect that created this inUnit|unit
FlagsNative | Function

Returns the effect that created this unit

# Arguments

  • unit — Unit

Returns — string<gamelink::Effect>

native string UnitGetOriginalEffect(unit inUnit);

Category: Unit / Basic

# Examples

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

    lv_p = EventPlayer();
    lv_missile = EventPlayerEffectUsedUnit(c_effectUnitSource);
    lv_effect = UnitGetOriginalEffect(lv_missile);
    lv_missileCaster = UnitGetOriginalCaster(lv_missile);
    lv_reflectTarget = lv_missileCaster;