# Attach Model To Unit (Inherit Visibility)
Grammar — Attach model to attachPoint|Attach Point on unit (Inherit Visibility)
Flags —Action
Creates a generic actor with the specified model attached to a unit at the specified attach point. Use “Last Created Actor” to get the actor. If the unit is hidden, the attached model will also be hidden.
# Arguments
unit
— Unitstring
<gamelink::Model> — Modelstring
<preset::AttachPoints> — AttachPoint
Returns — actor
actor libNtve_gf_AttachModelToUnitInheritVisibility(
unit lp_unit,
string lp_model,
string lp_attachPoint,
);
# Related
Category: Actor / Create Actors
- Attach Model To Unit —
actor
— libNtve_gf_AttachModelToUnit - Attach Model To Unit (Inherit Visibility) —
actor
— libNtve_gf_AttachModelToUnitInheritVisibility - Attach Model To Actor —
actor
— libNtve_gf_AttachModelToActor2 - Last Created Actor Scope —
actorscope
— libNtve_gf_ActorScopeLastCreated - Last Created Actor Scope by Message —
actorscope
— libNtve_gf_ActorScopeLastCreatedSend - Last Created Actor —
actor
— libNtve_gf_ActorLastCreated - Last Created Actor by Message —
actor
— libNtve_gf_ActorLastCreatedSend - Attach Actor To Unit —
actor
— libNtve_gf_AttachActorToUnit - Attach Actor To Actor —
actor
— libNtve_gf_AttachActorToActor - Create Actor Scope —
actorscope
— ActorScopeCreate - Create Actor —
actor
— ActorCreate - Create Actor Region —
actor
— ActorRegionCreate - Create Actor At Point —
actor
— libNtve_gf_CreateActorAtPoint - Create Model At Point —
actor
— libNtve_gf_CreateModelAtPoint - Create Model With Point Facing —
void
— libNtve_gf_CreateModelWithPointFacing - Actor Scope Move To —
void
— ActorScopeMoveTo
# Examples
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue03.sc2map/MapScript.galaxy:4808
libA3DDD02B_gf_SetAllSoundChannelVolumesCampaign(libA3DDD02B_ge_VolumeChannelModeCampaign_Game);
TriggerQueueExit();
libNtve_gf_AttachModelToUnitInheritVisibility(gv_malash, "ProtossGenericWarpOut", "Ref_Origin");
libNtve_gf_SendActorMessageToUnit(gv_malash, "SetOpacity 0.000000 1.500000");
Wait(1.5, c_timeGame);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue03.sc2map — MapScript.galaxy:4808
libA3DDD02B_gf_SetAllSoundChannelVolumesCampaign(libA3DDD02B_ge_VolumeChannelModeCampaign_Game);
TriggerQueueExit();
libNtve_gf_AttachModelToUnitInheritVisibility(gv_malash, "ProtossGenericWarpOut", "Ref_Origin");
libNtve_gf_SendActorMessageToUnit(gv_malash, "SetOpacity 0.000000 1.500000");
Wait(1.5, c_timeGame);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pmoebius01.sc2map/MapScript.galaxy:2156
libNtve_gf_RescueUnit(lv_taurenSpaceMarine, gv_pLAYER_01_USER, true);
Wait(1.0, c_timeAI);
libNtve_gf_AttachModelToUnitInheritVisibility(lv_taurenSpaceMarine, "TalkIcon", "Ref_Overhead");
lv_talkIcon = libNtve_gf_ActorLastCreated();
SoundPlayForPlayer(SoundLink("TaurenSpaceMarine_Ready", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/ppurifier03.sc2map/MapScript.galaxy:827
// Implementation
libNtve_gf_PauseUnit(lp_warpOutUnit, true);
libNtve_gf_AttachModelToUnitInheritVisibility(lp_warpOutUnit, "ProtossGenericWarpInOut", "Ref_Origin");
lv_warpOutModel = libNtve_gf_ActorLastCreated();
SoundPlayAtPointForPlayer(SoundLink("Event_Exp3_LassaraWarpInFinish", -1), c_maxPlayers, PlayerGroupAll(), UnitGetPosition(lp_warpOutUnit), 0.0, 50.0, 0.0);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pmoebius01.sc2map — MapScript.galaxy:2156
libNtve_gf_RescueUnit(lv_taurenSpaceMarine, gv_pLAYER_01_USER, true);
Wait(1.0, c_timeAI);
libNtve_gf_AttachModelToUnitInheritVisibility(lv_taurenSpaceMarine, "TalkIcon", "Ref_Overhead");
lv_talkIcon = libNtve_gf_ActorLastCreated();
SoundPlayForPlayer(SoundLink("TaurenSpaceMarine_Ready", -1), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/ppurifier03.sc2map — MapScript.galaxy:827
// Implementation
libNtve_gf_PauseUnit(lp_warpOutUnit, true);
libNtve_gf_AttachModelToUnitInheritVisibility(lp_warpOutUnit, "ProtossGenericWarpInOut", "Ref_Origin");
lv_warpOutModel = libNtve_gf_ActorLastCreated();
SoundPlayAtPointForPlayer(SoundLink("Event_Exp3_LassaraWarpInFinish", -1), c_maxPlayers, PlayerGroupAll(), UnitGetPosition(lp_warpOutUnit), 0.0, 50.0, 0.0);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:8389
// Deprecated
return libNtve_gf_AttachModelToUnitInheritVisibility(lp_unit, lp_model, lp_attachPoint);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:4306
}
libNtve_gf_AttachModelToUnitInheritVisibility(lp_target, lv_model, lp_attachPoint);
libVCMI_gf_PM_ReticleApplyTint(libNtve_gf_ActorLastCreated(), lp_type);
if (((lp_text != null) == false)) {
mods/heroesmapmods/battlegroundmapmods/battlefieldofeternity.stormmod — base.stormdata/LibMLBD.galaxy:510
UnitSetState(UnitLastCreated(), c_unitStateTooltipable, false);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(UnitLastCreated()), "birth", "Fly End", c_animFlagNonLooping, 0.0);
libNtve_gf_AttachModelToUnitInheritVisibility(libMLBD_gv_mMBOEBosses[lp_team], "HitTestFuzzy_Cyliner", "Ref_Origin");
ActorSend(libNtve_gf_ActorLastCreated(), "SetScale 2.700000,2.700000,4.500000");
libGame_gf_UpdateScalingForUnit(UnitLastCreated(), libGame_gv_scalingTicks, 0);
mods/heroesmapmods/battlegroundmapmods/battlefieldofeternity.stormmod — base.stormdata/LibMLBD.galaxy:1280
UnitSetState(libMLBD_gv_mMBOEBossesLaning, c_unitStateTargetable, true);
UnitSetCustomValue(libMLBD_gv_mMBOEBossesLaning, libCore_gf_CustomValueIndex(libCore_ge_CustomValueIndexes_MercLanerGroupIndex), IntToFixed(libMLBD_gv_mMBOE_AICustomUnitValue[lp_team]));
libNtve_gf_AttachModelToUnitInheritVisibility(libMLBD_gv_mMBOEBossesLaning, "HitTestFuzzy_Cyliner", "Ref_Origin");
ActorSend(libNtve_gf_ActorLastCreated(), "SetScale 2.700000,2.700000,4.500000");
AddUnitOfInterest(libMLBD_gv_mMBOEBossesLaning, 10.0, 0.0, "DefendImmortalLaner", libAIAI_gf_ConvertIntegertoGoalTeam(lp_team), 0);
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:4400
}
libNtve_gf_AttachModelToUnitInheritVisibility(lp_target, lv_model, lp_attachPoint);
libNCMI_gf_NM_ReticleApplyTint(libNtve_gf_ActorLastCreated(), lp_type);
if (((lp_text != null) == false)) {
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNovC.galaxy:191
// Deprecated
return libNtve_gf_AttachModelToUnitInheritVisibility(lp_unit, lp_model, lp_attachPoint);
}
mods/novastoryassets.sc2mod — base3.sc2maps/maps/campaign/nova/nova07.sc2map/MapScript.galaxy:3688
libNtve_gf_KillModel(libHots_gf_ActorForUnit(gv_dominatedBuddyUnit, 1));
libNtve_gf_AttachModelToUnitInheritVisibility(gv_dominatedBuddyUnit, "BeaconAttack", "Ref_Origin");
libHots_gf_StoreActorForUnit(gv_dominatedBuddyUnit, 1, libNtve_gf_ActorLastCreated());
UnitSetCustomValue(gv_dominatedBuddyUnit, gv_cUSTOMVALUEINDEX_DOMINATEDUNIT, 1.0);
mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova07.sc2map — MapScript.galaxy:3688
libNtve_gf_KillModel(libHots_gf_ActorForUnit(gv_dominatedBuddyUnit, 1));
libNtve_gf_AttachModelToUnitInheritVisibility(gv_dominatedBuddyUnit, "BeaconAttack", "Ref_Origin");
libHots_gf_StoreActorForUnit(gv_dominatedBuddyUnit, 1, libNtve_gf_ActorLastCreated());
UnitSetCustomValue(gv_dominatedBuddyUnit, gv_cUSTOMVALUEINDEX_DOMINATEDUNIT, 1.0);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:12154
}
libNtve_gf_AttachModelToUnitInheritVisibility(lp_target, lv_model, lp_attachPoint);
if (((lp_text != null) == false)) {
return ;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:5498
// Deprecated
return libNtve_gf_AttachModelToUnitInheritVisibility(lp_unit, lp_model, lp_attachPoint);
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:1572
}
libNtve_gf_AttachModelToUnitInheritVisibility(lp_target, lv_model, lp_attachPoint);
lp_outReticleRef.lv_effectActor = libNtve_gf_ActorLastCreated();
libWCdr_gf_WC_ReticleApplyTint(libNtve_gf_ActorLastCreated(), lp_type);