# Transfer Behavior

Grammar — Transfer inCount inBehavior from inSource|Source to inDest
FlagsNative | Action

Transfers a behavior from a source unit to a destination unit.

# Arguments

  • unit — Source Unit
  • unit — Destination Unit
  • string<gamelink::Behavior> — Behavior
  • int — Count

Returns — void

native void UnitBehaviorTransfer(
	unit inSource,
	unit inDest,
	string inBehavior,
	int inCount,
);

Category: Behavior / Basic

# Examples

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


    // Implementation
    UnitBehaviorTransfer(lp_source, lp_target, "DarkTemplarRecentlyRecalled", c_unitBehaviorCountAll);
    UnitBehaviorTransfer(lp_source, lp_target, "SOARecallOnDeathRecentlyRecalled", c_unitBehaviorCountAll);
    UnitBehaviorTransfer(lp_source, lp_target, "SOAHeroicShieldWeakness", c_unitBehaviorCountAll);

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

    // Implementation
    UnitBehaviorTransfer(lp_source, lp_target, "DarkTemplarRecentlyRecalled", c_unitBehaviorCountAll);
    UnitBehaviorTransfer(lp_source, lp_target, "SOARecallOnDeathRecentlyRecalled", c_unitBehaviorCountAll);
    UnitBehaviorTransfer(lp_source, lp_target, "SOAHeroicShieldWeakness", c_unitBehaviorCountAll);
    UnitBehaviorTransfer(lp_source, lp_target, "SOAHeroicShieldImmunity", c_unitBehaviorCountAll);

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

    UnitBehaviorTransfer(lp_source, lp_target, "DarkTemplarRecentlyRecalled", c_unitBehaviorCountAll);
    UnitBehaviorTransfer(lp_source, lp_target, "SOARecallOnDeathRecentlyRecalled", c_unitBehaviorCountAll);
    UnitBehaviorTransfer(lp_source, lp_target, "SOAHeroicShieldWeakness", c_unitBehaviorCountAll);
    UnitBehaviorTransfer(lp_source, lp_target, "SOAHeroicShieldImmunity", c_unitBehaviorCountAll);
}

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

    UnitBehaviorTransfer(lp_source, lp_target, "SOARecallOnDeathRecentlyRecalled", c_unitBehaviorCountAll);
    UnitBehaviorTransfer(lp_source, lp_target, "SOAHeroicShieldWeakness", c_unitBehaviorCountAll);
    UnitBehaviorTransfer(lp_source, lp_target, "SOAHeroicShieldImmunity", c_unitBehaviorCountAll);
}