# Send Actor Message Via Name

Grammar — Send message to the name actor of actor
FlagsNative | Action

Sends an actor message to an actor that is related to another actor. The Actor parameter is used to specify the primary actor, and the Name parameter is used to specify a reference (such as ::Host) that will derive a secondary actor from the primary actor. The message gets sent to the secondary actor. An actor message will perform an action and/or trigger an event on the actor it is sent to.

# Arguments

  • actor — Actor
  • string — Name
  • string [ actormsg ] — Message

Returns — void

native void ActorSendTo(
	actor a,
	string refName,
	string msg,
);

Category: Actor / Send Actor Messages

# Examples

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L3812
ActorSendTo(ActorFromDoodad(DoodadFromId(1607)), "SidewaysNydusAdditionDown", "ModelSwap SpaceTentacle")
// L3813
ActorSendTo(ActorFromDoodad(DoodadFromId(1607)), "SidewaysNydusAdditionDown", "AnimBracketStart HoverShort Hover,Start Stand IGNORE")
// L7813
ActorSendTo(ActorFromDoodad(DoodadFromId(1673)), "SidewaysNydusAdditionDownRight", "ModelSwap SpaceTentacle")
// L9050
ActorSendTo(ActorFromDoodad(DoodadFromId(1363)), "SidewaysNydusAdditionDownRight", "ModelSwap SpaceTentacle")
// L9051
ActorSendTo(ActorFromDoodad(DoodadFromId(1363)), "SidewaysNydusAdditionDownRight", "AnimPlay Stabilize Spell,B")
// L9061
ActorSendTo(ActorFromDoodad(DoodadFromId(1363)), "SidewaysNydusAdditionDownRight", "AnimSetPausedAll")
// L9080
ActorSendTo(ActorFromDoodad(DoodadFromId(1671)), "SidewaysNydusAdditionDownLeftSideways", "ModelSwap SpaceTentacle")
// L9081
ActorSendTo(ActorFromDoodad(DoodadFromId(1671)), "SidewaysNydusAdditionDownLeftSideways", "AnimPlay Stabilize Spell,B")
// L9090
ActorSendTo(ActorFromDoodad(DoodadFromId(1671)), "SidewaysNydusAdditionDownLeftSideways", "AnimSetPausedAll")
// L9109
ActorSendTo(ActorFromDoodad(DoodadFromId(1668)), "SidewaysNydusAdditionDownLeft", "ModelSwap SpaceTentacle")
// L3812
ActorSendTo(ActorFromDoodad(DoodadFromId(1607)), "SidewaysNydusAdditionDown", "ModelSwap SpaceTentacle")
// L3813
ActorSendTo(ActorFromDoodad(DoodadFromId(1607)), "SidewaysNydusAdditionDown", "AnimBracketStart HoverShort Hover,Start Stand IGNORE")
// L7813
ActorSendTo(ActorFromDoodad(DoodadFromId(1673)), "SidewaysNydusAdditionDownRight", "ModelSwap SpaceTentacle")
// L9050
ActorSendTo(ActorFromDoodad(DoodadFromId(1363)), "SidewaysNydusAdditionDownRight", "ModelSwap SpaceTentacle")
// L9051
ActorSendTo(ActorFromDoodad(DoodadFromId(1363)), "SidewaysNydusAdditionDownRight", "AnimPlay Stabilize Spell,B")
// L9061
ActorSendTo(ActorFromDoodad(DoodadFromId(1363)), "SidewaysNydusAdditionDownRight", "AnimSetPausedAll")
// L9080
ActorSendTo(ActorFromDoodad(DoodadFromId(1671)), "SidewaysNydusAdditionDownLeftSideways", "ModelSwap SpaceTentacle")
// L9081
ActorSendTo(ActorFromDoodad(DoodadFromId(1671)), "SidewaysNydusAdditionDownLeftSideways", "AnimPlay Stabilize Spell,B")
// L9090
ActorSendTo(ActorFromDoodad(DoodadFromId(1671)), "SidewaysNydusAdditionDownLeftSideways", "AnimSetPausedAll")
// L9109
ActorSendTo(ActorFromDoodad(DoodadFromId(1668)), "SidewaysNydusAdditionDownLeft", "ModelSwap SpaceTentacle")
// L2236
ActorSendTo(libNtve_gf_MainActorofUnit(gv_tBuildPylonPylon), "PowerVisual", "SetTintColorBlendPair 0,0,0 255,255,255 1.250000 Bounce")
// L2242
ActorSendTo(libNtve_gf_MainActorofUnit(gv_tBuildPylonPylon), "PowerVisual", "Destroy")
// L3921
ActorSendTo(libNtve_gf_MainActorofUnit(gv_tBuildPylonPylon), "PowerVisual", "Destroy")
// L2236
ActorSendTo(libNtve_gf_MainActorofUnit(gv_tBuildPylonPylon), "PowerVisual", "SetTintColorBlendPair 0,0,0 255,255,255 1.250000 Bounce")
// L2242
ActorSendTo(libNtve_gf_MainActorofUnit(gv_tBuildPylonPylon), "PowerVisual", "Destroy")
// L3921
ActorSendTo(libNtve_gf_MainActorofUnit(gv_tBuildPylonPylon), "PowerVisual", "Destroy")

# mods/heroesdata.stormmod

AILib.galaxy

// L2803
ActorSendTo(libNtve_gf_MainActorofUnit(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_core), "TowerAttackRange", "Destroy")
// L2810
ActorSendTo(libNtve_gf_MainActorofUnit(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_core), "TowerAttackRange", "Destroy")
// L2822
ActorSendTo(libNtve_gf_MainActorofUnit(lv_itUnit), "TowerAttackRange", "Destroy")

# mods/heroesdata.stormmod

GameLib.galaxy

// L8435
ActorSendTo(libNtve_gf_MainActorofUnit(libGame_gv_townTownData[lp_townIndex].lv_lootBannerUnit), "LootBanner", libNtve_gf_BannerSet(libGame_gv_players[lv_creditPlayer].lv_lootContent.lv_loot_Banner.lv_bannerID))
// L8447
ActorSendTo(libNtve_gf_MainActorofUnit(libGame_gv_townTownData[lp_townIndex].lv_lootBannerUnit), "LootBanner", libNtve_gf_BannerSet("NeutralMercCamp"))
// L8493
ActorSendTo(libNtve_gf_MainActorofUnit(lp_sconceUnit), "LootBanner", libNtve_gf_BannerSet(lv_realBannerID))

# mods/heroesmapmods/battlegroundmapmods/hanamura.stormmod

LibMHmu.galaxy

// L699
ActorSendTo(libNtve_gf_MainActorofUnit(libMHmu_gv_elevator_PathingBlocker_Unit), "::global.PayloadElevatorAttachment", "SetTintColor 0,255,255")

# mods/heromods/alarak.stormmod

LibHALA.galaxy

// L815
ActorSendTo(libNtve_gf_MainActorofUnit(lv_unit), "AlarakLightningSurgeReticule", "AnimSetTime Custom 0.200000")
// L816
ActorSendTo(libNtve_gf_MainActorofUnit(lv_unit), "AlarakLightningSurgeBeam", "AnimSetTime Custom 0.200000")
// L820
ActorSendTo(libNtve_gf_MainActorofUnit(lv_unit), "AlarakLightningSurgeReticule", "AnimSetTime Custom 0.300000")
// L821
ActorSendTo(libNtve_gf_MainActorofUnit(lv_unit), "AlarakLightningSurgeBeam", "AnimSetTime Custom 0.300000")
// L825
ActorSendTo(libNtve_gf_MainActorofUnit(lv_unit), "AlarakLightningSurgeReticule", "AnimSetTime Custom 0.390000")
// L826
ActorSendTo(libNtve_gf_MainActorofUnit(lv_unit), "AlarakLightningSurgeBeam", "AnimSetTime Custom 0.390000")
// L830
ActorSendTo(libNtve_gf_MainActorofUnit(lv_unit), "AlarakLightningSurgeReticule", "AnimSetTime Custom 0.430000")
// L831
ActorSendTo(libNtve_gf_MainActorofUnit(lv_unit), "AlarakLightningSurgeBeam", "AnimSetTime Custom 0.430000")
// L835
ActorSendTo(libNtve_gf_MainActorofUnit(lv_unit), "AlarakLightningSurgeReticule", "AnimSetTime Custom 0.540000")
// L836
ActorSendTo(libNtve_gf_MainActorofUnit(lv_unit), "AlarakLightningSurgeBeam", "AnimSetTime Custom 0.540000")

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L14544
ActorSendTo(libNtve_gf_MainActorofUnit(lv_u), libCOMI_gv_cM_MasteryVorazunDarkPylonRadiusActorLink, ("SetScale 0.45"))
// L14545
ActorSendTo(libNtve_gf_MainActorofUnit(lv_u), libCOMI_gv_cM_MasteryVorazunDarkPylonRadiusActorLink, (("SetScale " + FixedToString(lv_scale, 2) + " 1")))

# mods/warcoop/warclassicsystem.sc2mod

WarClassicSystem.galaxy

// L1359
ActorSendTo(libNtve_gf_MainActorofUnit(lv_itUnit), "AHerSuppress", "Destroy")