# Set Unit Behavior Spawn Count

FlagsNative | Action

Modifies the number of spawned units controlled by a behavior. If a behavior is not specified, it will affect all spawned behaviors.

# Arguments

  • unit — Unit
  • string [ gamelink::Behavior ] — Behavior
  • int — Count

Returns — void

native void UnitBehaviorSpawn(
	unit inUnit,
	string inBehavior,
	int inCount,
);

Category: Behavior / Basic

# Examples

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L4037
UnitBehaviorSpawn(lp_hatchery, "SpawnLarva", lp_larvaCount)

# campaigns/voidstory.sc2campaign

VoidCampaignMissionLib.galaxy

// L3600
UnitBehaviorSpawn(lp_hatchery, "SpawnLarva", lp_larvaCount)

# mods/missionpacks/novacampaign.sc2mod

LibNCMI.galaxy

// L3727
UnitBehaviorSpawn(lp_hatchery, "SpawnLarva", lp_larvaCount)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L11557
UnitBehaviorSpawn(lp_hatchery, "SpawnLarva", lp_larvaCount)

# mods/voidprologue.sc2mod

LibA3DDD02B.galaxy

// L2817
UnitBehaviorSpawn(lp_hatchery, "SpawnLarva", lp_larvaCount)