# Create Actor

Grammar — Create a name actor in the scope actorScope with content parameters content1, content2, content3
FlagsNative | Action

Creates an actor. The Scope parameter can be null if you do not want to create the actor in an existing scope. The Name parameter is the string ID of the actor you are creating. The Content parameters are optional, and allow you to specify additional properties for the actor being created. Running the “Last Created Actor” function immediately after this action will return the actor created by this action.

# Arguments

  • actorscope — Actor Scope
  • string [ gamelink::Actor ] — Name
  • string — Content1
  • string — Content2
  • string — Content3

Returns — actor

native actor ActorCreate(
	actorscope as,
	string actorName,
	string content1Name,
	string content2Name,
	string content3Name,
);

Category: Actor / Create Actors

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L4833
ActorCreate(ActorScopeFromUnit(UnitFromId(154)), "WaterSplash", null, null, null)
// L4834
ActorCreate(ActorScopeFromUnit(UnitFromId(455)), "WaterSplash", null, null, null)
// L4844
ActorCreate(ActorScopeFromUnit(UnitFromId(154)), "WaterDrops", null, null, null)
// L4845
ActorCreate(ActorScopeFromUnit(UnitFromId(455)), "WaterDrops", null, null, null)
// L4833
ActorCreate(ActorScopeFromUnit(UnitFromId(154)), "WaterSplash", null, null, null)
// L4834
ActorCreate(ActorScopeFromUnit(UnitFromId(455)), "WaterSplash", null, null, null)
// L4844
ActorCreate(ActorScopeFromUnit(UnitFromId(154)), "WaterDrops", null, null, null)
// L4845
ActorCreate(ActorScopeFromUnit(UnitFromId(455)), "WaterDrops", null, null, null)
// L1528
ActorCreate(null, "UI_pSetClick_CelestialArray", null, null, null)
// L1566
ActorCreate(null, "UI_pSetClick_ArmyConsole", null, null, null)
// L1590
ActorCreate(null, "UI_pSetClick_SolarCoreInterface", null, null, null)
// L1982
ActorCreate(null, "UI_pSetClick_SolarCoreInterface", null, null, null)
// L1528
ActorCreate(null, "UI_pSetClick_CelestialArray", null, null, null)
// L1566
ActorCreate(null, "UI_pSetClick_ArmyConsole", null, null, null)
// L1590
ActorCreate(null, "UI_pSetClick_SolarCoreInterface", null, null, null)
// L1982
ActorCreate(null, "UI_pSetClick_SolarCoreInterface", null, null, null)

# mods/core.sc2mod

NativeLib.galaxy

// L257
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L259
ActorCreate(lv_scope, "ModelHosted", (lp_model), "", "")
// L286
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L288
ActorCreate(lv_scope, "ModelHosted", (lp_model), "", "")
// L303
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L305
ActorCreate(lv_scope, "ModelHostedInheritVisibility", (lp_model), "", "")
// L361
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L364
ActorCreate(lv_scope, lp_actor, "", "", "")
// L380
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L383
ActorCreate(lv_scope, lp_attachingActor, "", "", "")
// L133
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L135
ActorCreate(lv_scope, "ModelHosted", (lp_model), "", "")
// L162
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L164
ActorCreate(lv_scope, "ModelHosted", (lp_model), "", "")
// L179
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L181
ActorCreate(lv_scope, "ModelHostedInheritVisibility", (lp_model), "", "")
// L237
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L240
ActorCreate(lv_scope, lp_actor, "", "", "")
// L256
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L259
ActorCreate(lv_scope, lp_attachingActor, "", "", "")

# mods/heroesdata.stormmod

GameLib.galaxy

// L17437
ActorCreate(ActorScopeFromUnit(lv_deadUnit), "RedemptionVisualModel", null, null, null)

# mods/heroesdata.stormmod

MapMechanicsLib.galaxy

// L6230
ActorCreate(ActorScopeFromUnit(UnitLastCreated()), "UI_Game_Ping_Tribute_Ready", null, null, null)
// L7237
ActorCreate(ActorScopeFromUnit(libMapM_gv_mMGardensDragonDragonTowers[lv_obelisk].lv_shrineUnit), "UI_Game_Ping_Shrine_Ready", null, null, null)
// L7280
ActorCreate(ActorScopeFromUnit(libMapM_gv_mMGardensDragonDragonTowers[lv_dragontower].lv_shrineUnit), "UI_Game_Ping_Shrine_Ready", null, null, null)

# mods/heroesmapmods/battlegroundmapmods/blackheartsbay.stormmod

LibBBAY.galaxy

// L403
ActorCreate(ActorScopeFromUnit(libBBAY_gv_mMBBCannonballsGhostShipBeacon), "UI_Game_Ping_GhostShip_Ready", null, null, null)
// L1427
ActorCreate(ActorScopeFromUnit(libBBAY_gv_mMBBCannonballsGhostShip), "UI_Game_Ping_GhostShip_Ready", null, null, null)
// L1864
ActorCreate(ActorScopeFromUnit(libBBAY_gv_mMBBCannonballsTreasureChestChests[lv_iter]), "UI_Game_Ping_TreasureSpawn", null, null, null)

# mods/heroesmapmods/battlegroundmapmods/gardenofterror.stormmod

LibGRDN.galaxy

// L195
ActorCreate(ActorScopeFromUnit(UnitLastCreated()), "UI_Game_Ping_Tribute_Ready", null, null, null)
// L422
ActorCreate(ActorScopeFromActor(libMapM_gv_mapMechanicControllerActor), "Amb_Group_GardenOfTerror_Day2Night", null, null, null)
// L457
ActorCreate(ActorScopeFromActor(libMapM_gv_mapMechanicControllerActor), "Amb_Group_GardenOfTerror_Night2Day", null, null, null)

# mods/heroesmapmods/battlegroundmapmods/hauntedmines.stormmod

LibMHtM.galaxy

// L1405
ActorCreate(ActorScopeFromUnit(lv_itGate), "UI_Game_Ping_Mines_Ready", null, null, null)

# mods/heroesmapmods/battlegroundmapmods/volskayasound.stormmod

LibVLSS.galaxy

// L121
ActorCreate(ActorScopeFromUnit(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_core), "UI_Game_Volskaya_CapturePoint_Capturing_Ally", null, null, null)
// L123
ActorCreate(ActorScopeFromUnit(libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_core), "UI_Game_Volskaya_CapturePoint_Capturing_Enemy", null, null, null)
// L127
ActorCreate(ActorScopeFromUnit(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_core), "UI_Game_Volskaya_CapturePoint_Capturing_Ally", null, null, null)
// L130
ActorCreate(ActorScopeFromUnit(libGame_gv_teams[libGame_gv_teamChaosIndex_C].lv_core), "UI_Game_Volskaya_CapturePoint_Capturing_Enemy", null, null, null)

# mods/heromods/chromie.stormmod

LibHCHR.galaxy

// L250
ActorCreate(ActorScopeFromUnit(EventPlayerEffectUsedUnitLaunch()), "ChromieTemporalLoopTargetTrailFX", null, null, null)

# mods/heromods/lucio.stormmod

LibHLUC.galaxy

// L585
ActorCreate(ActorScopeFromUnit(lv_lucioUnit), "LucioWallRideCantStopWontStopActivate", null, null, null)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L14254
ActorCreate(ActorScopeFromUnit(lv_u), "CandyBowlCandyX", null, null, null)
// L20583
ActorCreate(ActorScopeFromUnit(lv_bomberTargetUnit), "HHBomberAreaBombWarning", null, null, null)
// L25353
ActorCreate(ActorScopeFromUnit(lv_odin), "TychusOdinDeathTimeOut", null, null, null)

# mods/starcoop/starcoop.sc2mod

LibCOMU.galaxy

// L952
ActorCreate(ActorScopeFromUnit(lp_damagedUnit), "Diffusion_Shockwave_Coop", null, null, null)
// L962
ActorCreate(ActorScopeFromUnit(lp_damagedUnit), "Diffusion_Shockwave_Coop", null, null, null)
// L12399
ActorCreate(ActorScopeFromUnit(UnitLastCreated()), "Reanimator_Resurrect_Coop", null, null, null)

# mods/starcoop/starcoop.sc2mod

LibCOUI.galaxy

// L9338
ActorCreate(ActorScopeFromUnit(EventUnit()), "Heavens_COOP_GearDeliveryBeam_Source", null, null, null)
// L9341
ActorCreate(ActorScopeFromUnit(lv_squadhero), "Heavens_COOP_GearDeliveryBeam_Target", null, null, null)

# mods/warcoop/progression/equipments.sc2mod

LibPEqu.galaxy

// L69
ActorCreate(ActorScopeFromUnit(lv_attacker), "RemoveUnitTeleportVisual", null, null, null)

# mods/warcoop/warclassic.sc2mod

WarClassic.galaxy

// L266
ActorCreate(null, "War3_TriggerEffect", (lp_model), null, "null")
// L283
ActorCreate(lv_scope, "SiteHosted", lp_attachPoint, "", "")
// L285
ActorCreate(lv_scope, "War3_TriggerEffectHostedInheritVisibility", (lp_model), "", "")