# Model Swap
Grammar — ModelSwap model variation
Flags —Function
Constructs and returns a ModelSwap actor message. This message will swap the current model of an actor with an model to the specified Model and Variation number.
# Arguments
string
<gamelink::Model> — Modelint
— Variation
Returns — string
<actormsg>
string libNtve_gf_ModelSwap(
string lp_model,
int lp_variation,
);
# Related
Category: Actor / Message Constructors
- Actor Msg 1 —
string
<actormsg> — libNtve_gf_ActorMsg1 - Actor Msg 2 —
string
<actormsg> — libNtve_gf_ActorMsg2 - Actor Msg 3 —
string
<actormsg> — libNtve_gf_ActorMsg3 - Actor Msg 4 —
string
<actormsg> — libNtve_gf_ActorMsg4 - Action Damage —
string
<actormsg> — libNtve_gf_ActionDamage - Action Impact —
string
<actormsg> — libNtve_gf_ActionImpact - Alias Add —
string
<actormsg> — libNtve_gf_AliasAdd - Alias Remove —
string
<actormsg> — libNtve_gf_AliasRemove - Anim Baseline Start —
string
<actormsg> — libNtve_gf_AnimBaselineStart - Anim Baseline Stop —
string
<actormsg> — libNtve_gf_AnimBaselineStop - Anim Blend Time Apply —
string
<actormsg> — libNtve_gf_AnimBlendTimeApply - Anim Blend Time Remove —
string
<actormsg> — libNtve_gf_AnimBlendTimeRemove - Anim Bracket Resume —
string
<actormsg> — MakeMsgAnimBracketResume - Anim Bracket Start —
string
<actormsg> — MakeMsgAnimBracketStart - Anim Bracket Stop —
string
<actormsg> — MakeMsgAnimBracketStop - Anim Clear —
string
<actormsg> — libNtve_gf_AnimClear - Anim Clear All But —
string
<actormsg> — libNtve_gf_AnimClearAllBut - Anim Dump DB —
string
<actormsg> — libNtve_gf_AnimDumpDB - Anim Group Apply —
string
<actormsg> — MakeMsgAnimGroupApply - Anim Group Remove —
string
<actormsg> — MakeMsgAnimGroupRemove - Anim Group Remove All —
string
<actormsg> — libNtve_gf_AnimGroupRemoveAll - Anim Play —
string
<actormsg> — MakeMsgAnimPlay - Anim Play Sequence —
string
<actormsg> — libNtve_gf_AnimPlaySequence - Anim Set Completion —
string
<actormsg> — libNtve_gf_AnimSetCompletion - Anim Set Duration —
string
<actormsg> — libNtve_gf_AnimSetDuration - Anim Set Paused —
string
<actormsg> — libNtve_gf_AnimSetPaused - Anim Set Time —
string
<actormsg> — libNtve_gf_AnimSetTime - Anim Set Time Scale —
string
<actormsg> — libNtve_gf_AnimSetTimeScale - Anim Set Time Scale Global —
string
<actormsg> — libNtve_gf_AnimSetTimeScaleGlobal - Attach Set Bearings —
string
<actormsg> — libNtve_gf_AttachSetBearings - Attach Set Bearings From —
string
<actormsg> — libNtve_gf_AttachSetBearingsFrom - Attach Set Position —
string
<actormsg> — libNtve_gf_AttachSetPosition - Attach Set Position From —
string
<actormsg> — libNtve_gf_AttachSetPositionFrom - Attach Set Rotation —
string
<actormsg> — libNtve_gf_AttachSetRotation - Attach Set Rotation From —
string
<actormsg> — libNtve_gf_AttachSetRotationFrom - Create —
string
<actormsg> — libNtve_gf_Create - Create Copy —
string
<actormsg> — libNtve_gf_CreateCopy - Death Customize —
string
<actormsg> — libNtve_gf_DeathCustomize - Destroy —
string
<actormsg> — libNtve_gf_Destroy - HostSiteOpsSet —
string
<actormsg> — libNtve_gf_HostSiteOpsSet - List Add —
string
<actormsg> — libNtve_gf_ListAdd - List Remove —
string
<actormsg> — libNtve_gf_ListRemove - Missile Tentacle Return —
string
<actormsg> — libNtve_gf_MissileTentacleReturn - Model Event Suppress —
string
<actormsg> — libNtve_gf_ModelEventSuppress - Model Swap —
string
<actormsg> — libNtve_gf_ModelSwap - Mover Set Acceleration —
string
<actormsg> — libNtve_gf_MoverSetAcceleration - Mover Set Deceleration —
string
<actormsg> — libNtve_gf_MoverSetDeceleration - Mover Set Destination 2D —
string
<actormsg> — libNtve_gf_MoverSetDestination2D - Mover Set Destination From —
string
<actormsg> — libNtve_gf_MoverSetDestinationFrom - Mover Set Destination H —
string
<actormsg> — libNtve_gf_MoverSetDestinationH - Mover Set Destination Z —
string
<actormsg> — libNtve_gf_MoverSetDestinationZ - Mover Set Speed —
string
<actormsg> — libNtve_gf_MoverSetSpeed - Mover Set Speed Max —
string
<actormsg> — libNtve_gf_MoverSetSpeedMax - Mover Set Speed From Duration —
string
<actormsg> — libNtve_gf_MoverSetSpeedFromDuration - Mover Move —
string
<actormsg> — libNtve_gf_MoverMove - Mover Stop —
string
<actormsg> — libNtve_gf_MoverStop - Mover Stop Now —
string
<actormsg> — libNtve_gf_MoverStopNow - Multiply Scale —
string
<actormsg> — libNtve_gf_MultiplyScale - Print —
string
<actormsg> — libNtve_gf_Print - Query Persistent —
string
<actormsg> — libNtve_gf_QueryPersistent - Query Radius —
string
<actormsg> — libNtve_gf_QueryRadius - Query Region —
string
<actormsg> — libNtve_gf_QueryRegion - Ref Clear —
string
<actormsg> — libNtve_gf_RefClear - Ref Create —
string
<actormsg> — MakeMsgRefCreate - Ref Destroy —
string
<actormsg> — libNtve_gf_RefDestroy - Ref Dump —
string
<actormsg> — libNtve_gf_RefDump - Ref Notify —
string
<actormsg> — libNtve_gf_RefNotify - Ref Set —
string
<actormsg> — libNtve_gf_RefSet - Ref Set From Msg —
string
<actormsg> — libNtve_gf_RefSetFromMsg - Ref Set From Actor —
string
<actormsg> — libNtve_gf_RefSetFromActor - Ref Set From Request —
string
<actormsg> — MakeMsgRefSetFromRequest - Ref Set Refresh Name —
string
<actormsg> — libNtve_gf_RefSetRefreshName - Ref Table Dump —
string
<actormsg> — MakeMsgRefTableDump - Set Bearings —
string
<actormsg> — libNtve_gf_SetBearings - Set Bearings From —
string
<actormsg> — libNtve_gf_SetBearingsFrom - Set Bearings H —
string
<actormsg> — libNtve_gf_SetBearingsH - Set Facing —
string
<actormsg> — libNtve_gf_SetFacing - Set Height —
string
<actormsg> — libNtve_gf_SetHeight - Set Opacity —
string
<actormsg> — libNtve_gf_SetOpacity - Set Physics State —
string
<actormsg> — MakeMsgSetPhysicsState - Set Position —
string
<actormsg> — libNtve_gf_SetPosition - Set Position 2D —
string
<actormsg> — libNtve_gf_SetPosition2D - Set Position 2D H —
string
<actormsg> — libNtve_gf_SetPosition2DH - Set Position From —
string
<actormsg> — libNtve_gf_SetPositionFrom - Set Position H —
string
<actormsg> — libNtve_gf_SetPositionH - Set Render To Texture Enabled —
string
<actormsg> — libNtve_gf_SetRenderToTextureEnabled - Set Rotation —
string
<actormsg> — libNtve_gf_SetRotation - Set Rotation From —
string
<actormsg> — libNtve_gf_SetRotationFrom - Set Scale —
string
<actormsg> — libNtve_gf_SetScale - Set Scale Absolute —
string
<actormsg> — libNtve_gf_SetScaleAbsolute - Set Team Color —
string
<actormsg> — libNtve_gf_SetTeamColor - Set Local Tint Color —
string
<actormsg> — libNtve_gf_SetLocalTintColor - Set Tint Color —
string
<actormsg> — libNtve_gf_SetTintColor - Set Visibility —
string
<actormsg> — libNtve_gf_SetVisibility - Set Walk Anim Move Speed —
string
<actormsg> — libNtve_gf_SetWalkAnimMoveSpeed - Set Z —
string
<actormsg> — libNtve_gf_SetZ - Signal —
string
<actormsg> — libNtve_gf_Signal - Sound Add DSP —
string
<actormsg> — libNtve_gf_SoundAddDSP - Sound Set Muted —
string
<actormsg> — libNtve_gf_SoundSetMuted - Sound Set Offset —
string
<actormsg> — libNtve_gf_SoundSetOffset - Sound Set Paused —
string
<actormsg> — libNtve_gf_SoundSetPaused - Status Decrement —
string
<actormsg> — libNtve_gf_StatusDecrement - Status Increment —
string
<actormsg> — libNtve_gf_StatusIncrement - Texture Dump —
string
<actormsg> — libNtve_gf_TextureDump - Texture Dump DB —
string
<actormsg> — libNtve_gf_TextureDumpDB - Texture Group Apply —
string
<actormsg> — libNtve_gf_TextureGroupApply - Texture Group Remove —
string
<actormsg> — libNtve_gf_TextureGroupRemove - Texture Select By ID —
string
<actormsg> — libNtve_gf_TextureSelectByID - Texture Select By Match —
string
<actormsg> — MakeMsgTextureSelectByMatch - Texture Select By Slot —
string
<actormsg> — MakeMsgTextureSelectBySlot - Texture Video Play (Advanced) —
string
<actormsg> — MakeMsgTextureVideoPlay - Texture Video Play —
string
<actormsg> — libNtve_gf_MakeMsgTextureVideoPlay - Texture Video Set Frame (Advanced) —
string
<actormsg> — MakeMsgTextureVideoSetFrame - Texture Video Set Frame —
string
<actormsg> — libNtve_gf_TextureVideoSetFrame - Texture Video Set Paused (Advanced) —
string
<actormsg> — MakeMsgTextureVideoSetPaused - Texture Video Set Paused —
string
<actormsg> — libNtve_gf_TextureVideoSetPaused - Texture Video Set Time (Advanced) —
string
<actormsg> — MakeMsgTextureVideoSetTime - Texture Video Set Time —
string
<actormsg> — libNtve_gf_TextureVideoSetTime - Texture Video Stop (Advanced) —
string
<actormsg> — MakeMsgTextureVideoStop - Texture Video Stop —
string
<actormsg> — libNtve_gf_TextureVideoStop - Texture Video Stop All —
string
<actormsg> — libNtve_gf_TextureVideoStopAll - Timer Set —
string
<actormsg> — libNtve_gf_TimerSet - Timer Kill —
string
<actormsg> — libNtve_gf_TimerKill - Transition —
string
<actormsg> — MakeMsgTransition
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:955
UnitGroupAdd(gv_lab02DominionUnitGroup, gv_turret08);
UnitGroupAdd(gv_lab02DominionUnitGroup, gv_turret09);
ActorSend(ActorFromDoodad(DoodadFromId(235)), libNtve_gf_ModelSwap("HybridHoldingCellDeath", 0));
ActorSend(ActorFromDoodad(DoodadFromId(235)), "AnimPlay '' Death PlayForever");
auto33CC760C_g = UnitGroup(null, c_playerAny, RegionFromId(16), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterHidden - 32))), 0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner05s.sc2map — MapScript.galaxy:955
UnitGroupAdd(gv_lab02DominionUnitGroup, gv_turret08);
UnitGroupAdd(gv_lab02DominionUnitGroup, gv_turret09);
ActorSend(ActorFromDoodad(DoodadFromId(235)), libNtve_gf_ModelSwap("HybridHoldingCellDeath", 0));
ActorSend(ActorFromDoodad(DoodadFromId(235)), "AnimPlay '' Death PlayForever");
auto33CC760C_g = UnitGroup(null, c_playerAny, RegionFromId(16), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterHidden - 32))), 0);
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:5448
// Automatic Variable Declarations
// Implementation
libNtve_gf_SendActorMessageToUnit(lp_unit, libNtve_gf_ModelSwap(lp_model, lp_percent));
if ((StringLength(lp_textures) > 0)) {
libNtve_gf_SendActorMessageToUnit(lp_unit, MakeMsgTextureSelectBySlot("main", c_textureSlotComponentDefault, ("BestMatch " + lp_textures)));
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:4640
// Automatic Variable Declarations
// Implementation
libNtve_gf_SendActorMessageToUnit(lp_unit, libNtve_gf_ModelSwap(lp_model, lp_percent));
if ((StringLength(lp_textures) > 0)) {
libNtve_gf_SendActorMessageToUnit(lp_unit, MakeMsgTextureSelectBySlot("main", c_textureSlotComponentDefault, ("BestMatch " + lp_textures)));
mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod — base.stormdata/LibPVEB.galaxy:2223
UnitBehaviorSetDuration(libPVEB_gv_pvEResurrectSpirit[lv_deadPlayer], "PVEResurrectRezzable", lv_resurrectTimerDuration);
}
ActorSend(libNtve_gf_MainActorofUnit(libPVEB_gv_pvEResurrectSpirit[lv_deadPlayer]), libNtve_gf_ModelSwap(libCore_gf_GetModelLinkForUnitType(UnitGetType(lv_deadHero)), 0));
ActorSend(libNtve_gf_MainActorofUnit(libPVEB_gv_pvEResurrectSpirit[lv_deadPlayer]), libNtve_gf_Signal("Stunned"));
libPVEB_gv_pvEResurrectSpirit[lv_deadPlayer] = UnitLastCreated();
mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod — base.stormdata/LibPVEM.galaxy:1821
UnitBehaviorSetDuration(libPVEM_gv_pvEResurrectSpirit[lv_deadPlayer], "DeadHeroResurrectRezzable", lv_resurrectTimerDuration);
}
ActorSend(libNtve_gf_MainActorofUnit(libPVEM_gv_pvEResurrectSpirit[lv_deadPlayer]), libNtve_gf_ModelSwap(libCore_gf_GetModelLinkForUnitType(UnitGetType(lv_deadHero)), 0));
ActorSend(libNtve_gf_MainActorofUnit(libPVEM_gv_pvEResurrectSpirit[lv_deadPlayer]), libNtve_gf_Signal("Stunned"));
libPVEM_gv_pvEResurrectSpirit[lv_deadPlayer] = UnitLastCreated();
mods/heromods/auriel.stormmod — base.stormdata/LibHAUR.galaxy:218
autoEE4E787F_val = UnitGetType(lp_deadHero);
if (autoEE4E787F_val == "HeroAlexstraszaDragon") {
ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lp_deadPlayer]), libNtve_gf_ModelSwap(libCore_gf_GetModelLinkForUnitType("HeroAlexstrasza"), 0));
}
else {
mods/heromods/auriel.stormmod — base.stormdata/LibHAUR.galaxy:221
}
else {
ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lp_deadPlayer]), libNtve_gf_ModelSwap(libCore_gf_GetModelLinkForUnitType(UnitGetType(lp_deadHero)), 0));
}
ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lp_deadPlayer]), libNtve_gf_Signal("Taunt"));
mods/heromods/auriel.stormmod — base.stormdata/LibHAUR.galaxy:1127
}
ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer]), libNtve_gf_ModelSwap("HitTestFuzzy_Cyliner", 0));
ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer]), libNtve_gf_SetOpacity(0.0, 0));
ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer]), libNtve_gf_SetScale(2.0, 2.0, 4.5, 0.0));
mods/heromods/auriel.stormmod — base.stormdata/LibHAUR.galaxy:1139
UnitBehaviorAdd(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer], "AurielResurrectRezzable", libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer], 1);
UnitBehaviorSetDuration(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer], "AurielResurrectRezzable", (TimerGetDuration(libGame_gv_players[lv_deadPlayer].lv_respawnTimer) - libHAUR_gv_heroAurielResurrectTargetUnresurrectableTime));
ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer]), libNtve_gf_ModelSwap(libCore_gf_GetModelLinkForUnitType(UnitGetType(lv_deadHero)), 0));
if ((UnitIsAlive(libGame_gv_heroDeathMurkyRespawnEggs[lv_deadPlayer]) == true)) {
TriggerEnable(libHAUR_gt_HeroAurielResurrectMurkyEggDeathSpiritReveal, true);