# Create Effect On Unit (From Player)
Grammar — Execute effect on unit from player caster
Flags —Native
|Action
Runs an effect, targeting the specified unit. This effect will not have a caster unit.
# Arguments
int
— Playerstring
<gamelink::Effect> — Effectunit
— Target
Returns — void
native void PlayerCreateEffectUnit(
int inPlayer,
string inEffect,
unit inTarget,
);
# Related
Category: Environment / Effects
- Create Explosion At Point —
void
— libNtve_gf_CreateExplosionAtPoint - Create Effect At Point (From Player) —
void
— PlayerCreateEffectPoint - Create Effect On Unit (From Player) —
void
— PlayerCreateEffectUnit - Create Effect At Point (From Unit) —
void
— UnitCreateEffectPoint - Create Effect On Unit (From Unit) —
void
— UnitCreateEffectUnit - Damage Unit (From Unit) —
void
— UnitDamage - Player Can Create Effect At Point —
bool
— libNtve_gf_PlayerCanCreateEffectAtPoint - Player Can Create Effect On Unit —
bool
— libNtve_gf_PlayerCanCreateEffectOnUnit - Unit Can Create Effect At Point —
bool
— libNtve_gf_UnitCanCreateEffectAtPoint - Unit Can Create Effect On Unit —
bool
— libNtve_gf_UnitCanCreateEffectOnUnit - Destroy Effects —
void
— GameDestroyEffects - Effect Used —
void
— TriggerAddEventPlayerEffectUsed - Effect Used From Scope —
void
— TriggerAddEventPlayerEffectUsedFromScope - Triggering Effect Used —
string
<gamelink::Effect> — EventPlayerEffectUsed - Triggering Effect Point —
point
— EventPlayerEffectUsedPoint - Triggering Effect Unit —
unit
— EventPlayerEffectUsedUnit - Triggering Effect Item —
unit
— EventPlayerEffectUsedItem - Triggering Effect Impact Unit —
unit
— EventPlayerEffectUsedUnitImpact - Triggering Effect Launch Unit —
unit
— EventPlayerEffectUsedUnitLaunch - Triggering Effect Unit Owner —
int
— EventPlayerEffectUsedUnitOwner - Triggering Effect Unit Type —
string
<gamelink::Unit> — EventPlayerEffectUsedUnitType - Triggering Effect Item Type —
string
<gamelink::Unit> — EventPlayerEffectUsedItemType - Triggering Effect Amount (Integer) —
int
— EventPlayerEffectUsedAmountInt - Triggering Effect Amount (Real) —
fixed
— EventPlayerEffectUsedAmountFixed - Triggering Effect Source Behavior —
string
<gamelink::Behavior> — EventPlayerEffectUsedSourceBehavior - Triggering Effect Weapon —
string
<gamelink::Weapon> — EventPlayerEffectUsedWeapon - Triggering Effect Ability —
string
<gamelink::Abil> — EventPlayerEffectUsedAbil
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:7922
if (autoD60EF79C_var == null) { break; }
if ((WorldHeight(c_heightMapGround, UnitGetPosition(autoD60EF79C_var)) <= gv__4HeightOfLava)) {
PlayerCreateEffectUnit(0, "LavaFireDamage", autoD60EF79C_var);
if ((UnitHasBehavior(autoD60EF79C_var, "Incapacitated") == true)) {
UnitSetPropertyFixed(autoD60EF79C_var, c_unitPropLife, (UnitGetPropertyFixed(autoD60EF79C_var, c_unitPropLife, c_unitPropCurrent) - 10.0));
campaigns/liberty.sc2campaign — base.sc2maps/maps/challenges/rushdefense.sc2map/MapScript.galaxy:854
while (!UnitGroupLoopDone()) {
if ((UnitHasBehavior(UnitGroupLoopCurrent(), "TimeWarpProduction") == false)) {
PlayerCreateEffectUnit(gv_p3_ENEMY_PROTOSS, "ChronoBoost", UnitGroupLoopCurrent());
TriggerEnable(TriggerGetCurrent(), false);
Wait(45.0, c_timeGame);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02a.sc2map — MapScript.galaxy:7922
if (autoD60EF79C_var == null) { break; }
if ((WorldHeight(c_heightMapGround, UnitGetPosition(autoD60EF79C_var)) <= gv__4HeightOfLava)) {
PlayerCreateEffectUnit(0, "LavaFireDamage", autoD60EF79C_var);
if ((UnitHasBehavior(autoD60EF79C_var, "Incapacitated") == true)) {
UnitSetPropertyFixed(autoD60EF79C_var, c_unitPropLife, (UnitGetPropertyFixed(autoD60EF79C_var, c_unitPropLife, c_unitPropCurrent) - 10.0));
campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/rushdefense.sc2map — MapScript.galaxy:854
while (!UnitGroupLoopDone()) {
if ((UnitHasBehavior(UnitGroupLoopCurrent(), "TimeWarpProduction") == false)) {
PlayerCreateEffectUnit(gv_p3_ENEMY_PROTOSS, "ChronoBoost", UnitGroupLoopCurrent());
TriggerEnable(TriggerGetCurrent(), false);
Wait(45.0, c_timeGame);
mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod — base.stormdata/LibMDoE.galaxy:2894
libMDoE_gf_PlayerPicksUpAmmoDisplayText(lv_collectingPlayer, lv_collectingUnit);
if ((lv_collectingTeam == libGame_gv_teamOrderIndex_C)) {
PlayerCreateEffectUnit(libCore_gv_cOMPUTER_TeamChaos, "ApplyCannonballRevealed", lv_collectingUnit);
}
else {
mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod — base.stormdata/LibMDoE.galaxy:2897
}
else {
PlayerCreateEffectUnit(libCore_gv_cOMPUTER_TeamOrder, "ApplyCannonballRevealed", lv_collectingUnit);
}
AddUnitOfInterest(lv_collectingUnit, 0.0, 0.0, "InterceptCannonball", libNtve_ge_GoalTeam_Both, 0);
mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod — base.stormdata/LibMDoE.galaxy:2994
}
PlayerCreateEffectUnit(lv_collectingPlayer, "DoubloonPickupSet", lv_collectingUnit);
if ((lv_collectingTeam == libGame_gv_teamOrderIndex_C)) {
PlayerCreateEffectUnit(libCore_gv_cOMPUTER_TeamChaos, "ApplyCannonballRevealed", lv_collectingUnit);
mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod — base.stormdata/LibMDoE.galaxy:2996
PlayerCreateEffectUnit(lv_collectingPlayer, "DoubloonPickupSet", lv_collectingUnit);
if ((lv_collectingTeam == libGame_gv_teamOrderIndex_C)) {
PlayerCreateEffectUnit(libCore_gv_cOMPUTER_TeamChaos, "ApplyCannonballRevealed", lv_collectingUnit);
}
else {
mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod — base.stormdata/LibMDoE.galaxy:2999
}
else {
PlayerCreateEffectUnit(libCore_gv_cOMPUTER_TeamOrder, "ApplyCannonballRevealed", lv_collectingUnit);
}
AddUnitOfInterest(lv_collectingUnit, 0.0, 0.0, "InterceptCannonball", libNtve_ge_GoalTeam_Both, 0);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:3101
libGDHL_gv_heroRexxarMishaLastKnownTargetLocation[lv_player] = UnitGetPosition(libGDHL_gv_heroRexxarMishaPursuitTarget[lv_player]);
libGDHL_gv_commandMishaTargetUnit[lv_player] = libGDHL_gv_heroRexxarMishaPursuitTarget[lv_player];
PlayerCreateEffectUnit(lv_player, "RexxarApplyMishaFocusTargetBehavior", libGDHL_gv_heroRexxarMishaPursuitTarget[lv_player]);
UnitBehaviorAdd(lv_misha, "RexxarMishaFocussedOnUnit", lv_rexxar, 1);
UnitIssueOrder(lv_misha, OrderTargetingUnit(AbilityCommand("attack", 0), libGDHL_gv_heroRexxarMishaPursuitTarget[lv_player]), c_orderQueueReplace);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:11288
auto9FB90F8E_var = UnitGroupUnitFromEnd(auto9FB90F8E_g, auto9FB90F8E_u);
if (auto9FB90F8E_var == null) { break; }
PlayerCreateEffectUnit(lv_player, "KerriganSummonUltraliskRemoveUltraliskActiveBehavior", auto9FB90F8E_var);
}
return true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:20750
else {
UnitCreateEffectPoint(libGame_gf_UnitEntersSafeZonePuntRegionUnit(), "HallOfStormsKnockbackLaunchMissile", libGame_gf_UnitEntersSafeZonePuntRegionPuntPoint());
PlayerCreateEffectUnit(UnitGetOwner(libGame_gf_UnitEntersSafeZonePuntRegionUnit()), "HallOfStormsKnockbackImpactSet", libGame_gf_UnitEntersSafeZonePuntRegionUnit());
}
return true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/StartingExperienceLib.galaxy:659
if (lv_itPlayer<0) { break; }
if ((lv_itPlayer <= libCore_gv_bALMaxPlayers) && (libGame_gv_players[lv_itPlayer].lv_heroUnit != null)) {
PlayerCreateEffectUnit(lv_itPlayer, "GodRayDestroyPersistent", libGame_gv_players[lv_itPlayer].lv_heroUnit);
}
mods/heromods/chogall.stormmod — base.stormdata/LibHCHO.galaxy:2132
if (((lv_killingPlayer <= 0) || (lv_killingPlayer > libCore_gv_bALMaxPlayers) || (libGame_gv_gameOver == false))) {
PlayerCreateEffectUnit(lv_killingPlayer, "GallDeathSwitch", libGDHL_gv_chogallPairs[lv_choGallPairsTeam].lv_gallUnit);
}
else {
mods/novastoryassets.sc2mod — base.sc2maps/maps/campaign/nova/nova01.sc2map/MapScript.galaxy:406
SoundPlayForPlayer(SoundLink("MedkitSound", 0), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
SoundPlayForPlayer(SoundLink("UI_Pickup_VultureCube", 0), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
PlayerCreateEffectUnit(1, "PickupHealthFullVulturePathDummySet", gv_artanis);
if ((gv_currentSection == 1)) {
lv_i = 1;
mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova01.sc2map — MapScript.galaxy:406
SoundPlayForPlayer(SoundLink("MedkitSound", 0), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
SoundPlayForPlayer(SoundLink("UI_Pickup_VultureCube", 0), c_maxPlayers, PlayerGroupAll(), 100.0, 0.0);
PlayerCreateEffectUnit(1, "PickupHealthFullVulturePathDummySet", gv_artanis);
if ((gv_currentSection == 1)) {
lv_i = 1;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:13556
if (((FixedToInt(lv_foodCompare) + libCOMI_gv_cM_Abathur_Enemy_Death_Create_Locusts_Random_Modifier) >= lv_rand)) {
libNtve_gf_CreateUnitsWithDefaultFacing(1, lv_locustUnitType, c_unitCreateIgnorePlacement, lv_abathurCommander, UnitGetPosition(EventUnit()));
PlayerCreateEffectUnit(lv_abathurCommander, "AbathurLocustTimedLife", UnitLastCreated());
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:15672
if (((FixedToInt(lv_foodCompare) + libCOMI_gv_cM_Abathur_Enemy_Death_Create_Locusts_Random_Modifier) >= lv_rand)) {
libNtve_gf_CreateUnitsWithDefaultFacing(1, lv_locustUnitType, c_unitCreateIgnorePlacement, lv_abathurAllyOfKillingPlayer, UnitGetPosition(EventUnit()));
PlayerCreateEffectUnit(lv_abathurAllyOfKillingPlayer, "AbathurLocustTimedLife", UnitLastCreated());
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2957
for ( ; ( (auto8224E9CC_ai >= 0 && lv_bonusAmount <= auto8224E9CC_ae) || (auto8224E9CC_ai < 0 && lv_bonusAmount >= auto8224E9CC_ae) ) ; lv_bonusAmount += auto8224E9CC_ai ) {
lv_mineralPatch = UnitGroupRandomUnit(UnitGroup("MineralField", c_playerAny, RegionCircle(PlayerStartLocation(lp_giftPlayer), 8.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive);
PlayerCreateEffectUnit(lp_giftPlayer, "MutatorCalldownMULECreateUnit", lv_mineralPatch);
if ((lv_oracleMade == false)) {
lv_oracleMade = true;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:12987
if ((UnitGroupCount(lv_hungerUnits, c_unitCountAlive) > 0)) {
lv_hungerTarget = UnitGroupRandomUnit(lv_hungerUnits, c_unitCountAlive);
PlayerCreateEffectUnit(lv_hungryPlayer, "MutatorHungerDamage", lv_hungerTarget);
SoundPlayOnUnitForPlayer(SoundLink("InfestedCivilian_Moan", -1), c_maxPlayers, PlayerGroupAll(), lv_hungerTarget, 0.0, 100.0, 0.0);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:12992
else if ((UnitGroupCount(lv_hungerWorkers, c_unitCountAlive) > 0)) {
lv_hungerTarget = UnitGroupRandomUnit(lv_hungerWorkers, c_unitCountAlive);
PlayerCreateEffectUnit(lv_hungryPlayer, "MutatorHungerDamage", lv_hungerTarget);
SoundPlayOnUnitForPlayer(SoundLink("InfestedCivilian_Moan", -1), c_maxPlayers, PlayerGroupAll(), lv_hungerTarget, 0.0, 100.0, 0.0);
}