# Original Caster Of Unit

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

Returns the unit caster that created this unit

# Arguments

  • unit — Unit

Returns — unit

native unit UnitGetOriginalCaster(unit inUnit);

Category: Unit / Basic

# Examples

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

    lv_missile = EventPlayerEffectUsedUnit(c_effectUnitSource);
    lv_effect = UnitGetOriginalEffect(lv_missile);
    lv_missileCaster = UnitGetOriginalCaster(lv_missile);
    lv_reflectTarget = lv_missileCaster;
    lv_sentry = EventPlayerEffectUsedUnit(c_effectUnitCaster);