npc_dota_scripted_spawner
- Dota 2
Point Entity
[DEPRECATED ENTITY?] Spawns NPCs based on scripts for tutorials / single player / co-op.
Keyvalues
-
Team Number (
teamnumber) <Choices>- Unassigned (
0) - Spectators (
1) - Good Guys (
2) - Bad Guys (
3) - Neutrals (
4) - No Team (
5) - Custom 1 (
6) - Custom 2 (
7) - Custom 3 (
8) - Custom 4 (
9) - Custom 5 (
10) - Custom 6 (
11) - Custom 7 (
12) - Custom 8 (
13)
- Unassigned (
-
Entity Scripts (
vscripts) <ScriptList>
Name(s) of script files that are executed after all entities have spawned. -
Name (
targetname) <TargetSource>
The name that other entities refer to this entity by. -
First Waypoint (
NPCFirstWaypoint) <TargetDestination>
First Waypoint the spawned NPCs will head to -
NPC Type (
NPCType) <Choices>- melee creep (0) (
0) - ranged creep (1) (
1) - siege creep (2) (
2) - Roquelaire (3) (
3) - Keeper of the Light (4) (
4) - Razor (5) (
5) - Tidehunter (6) (
6) - Observer Ward (7) (
7) - Custom (8) (
8)
- melee creep (0) (
-
Custom NPC Name (
CustomNPCName) <GameUnitClass>
Custom name of NPC: (ex. npc_dota_hero_tidehunter ).
Inputs
-
RunScriptFile <
String>
Load and execute a script file -
RunScriptCode <
String>
Execute a fragment of script code -
CallScriptFunction <
String>
Call a script function -
CallPrivateScriptFunction <
String>
Calls a script function from this entity's private script scope. -
CallGlobalScriptFunction <
String>
Calls a script function in the global script scope. -
Kill <
Void>
Removes this entity from the world. -
KillHierarchy <
Void>
Removes this entity and all its children from the world. -
KillConstrained <
Void>
Removes this entity, all its children, and anything constrained to it, from the world. -
AddOutput <
String>
Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care. -
FireUser1 <
Void>
Causes this entity's OnUser1 output to be fired. -
FireUser2 <
Void>
Causes this entity's OnUser2 output to be fired. -
FireUser3 <
Void>
Causes this entity's OnUser3 output to be fired. -
FireUser4 <
Void>
Causes this entity's OnUser4 output to be fired. -
SpawnNPC <
Integer>
Spawn X NPCs. Set the team and type of the NPC before calling this. -
SetNPCTeam <
Integer>
Set the NPC team. See the 'NPC Team' choices for the valid values. -
SetNPCType <
Integer>
Set the NPC type. See the 'NPC Type' choices for the valid values. -
SetNPCWaypoint <
TargetDestination>
Set the waypoint that spawned NPCs should head to. Living NPCs will move to it when they're ready to move (i.e. not in combat). -
RemoveAllSpawnedUnits <
Void>
Remove all living spawned NPCs. -
SetAllowRelaxation <
Integer>
Set whether spawned NPCs are allowed to relax (1 for true, 0 for false). Relaxing NPCs will play sit down animations when they're idle. -
SetAllowAutoAttack <
Integer>
Set whether spawned NPCs are allowed to automatically attack nearby enemies (1 for true, 0 for false). By default spawned NPCs will do so. -
SetAutomaticallyRespawn <
Integer>
Set whether this spawned should automatically respawn any dying spawned NPCs. If true, it'll never fire the OnAllUnitsKilled output. -
SetPlayPostVictoryAnimation <
Integer>
Set whether spawned NPCs should play post combat victory animations (1 for true, 0 for false). If so, the NPCs will play a victory animation whenever the last nearby enemy is killed. -
FireTutorialAdvanceEvent <
String>
Fire a tutorial event. If the string matches the current tutorial lesson's 'advance_event' value, the lesson will advance. -
SetSpawnPoint <
TargetDestination>
Set the spawn point of any NPCs created by this spawner. By default it'll be the spawner itself. -
SetCompanion <
Boolean>
Turn on/off companion behavior. -
SetCompanionAttack <
Boolean>
Turn on/off companion creep aggression. -
TeleportToWaypoint <
TargetDestination>
Teleport the spawned NPC to a waypoint. -
SetInvulnerable <
Boolean>
Turn on/off invulnerability for any NPC created by this spawner. -
SetHealth <
Integer>
Set the health of all currently living NPCs created by this spawner. Note that this will not affect the health of NPCs spawned in the future. -
ForceIdle <
Boolean>
Force the NPC to go idle. -
ForceCreepAttack <
Boolean>
Force the NPC to attack creeps. -
UseAbility <
Integer>
Force the NPC to use an ability. -
SetDuration <
Float>
Set a general timer for the NPC. -
SetAllowHeroTargets <
Boolean>
Allow targeting of heroes (1 for true, 0 for false). -
SetCustomNPCName <
String>
Set custom NPC for spawning.
Outputs
-
OnUser1 <
Void>
Fired in response to FireUser1 input. -
OnUser2 <
Void>
Fired in response to FireUser2 input. -
OnUser3 <
Void>
Fired in response to FireUser3 input. -
OnUser4 <
Void>
Fired in response to FireUser4 input. -
OnKilled <
Void>
Fired when the entity is killed and removed from the game. Parameter is the inflictor. -
OnAllUnitsKilled <
Void>
Fired when the last of our spawned NPCs has been killed. -
OnUnitKilled <
Void>
Fired whenever one of our spawned NPCs has been killed. -
OnHealthLow <
Void>
Fired when a NPCs health is low (less than 25 percent).