Ship item spawner

From Valve Developer Community
Jump to: navigation, search
Note:For the sake of this article, # represents a digit from 1 to 3.

Entity Description

Item spawner

Keyvalues

  • Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.
  • EnableDisable:
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (probably with the Enable input).
  • SpawnItem1-5
<choices> Items to spawn
Literal Value Description

Books

item_alice Alice in Wonderland
item_thebible The Bible
item_dracula Dracula
item_huckfinn Huckleberry Finn
item_huntersquarry The Hunter's Quarry
item_kamasutra Kamasutra
item_onoff On/Off
item_paradiselost Paradise Lost
item_prideandprejudice Pride and Prejudice
item_theraven The Raven
item_treasureisland Treasure Island

Food

item_drink_can Can of Juice
item_drink_energy Energy Drink
item_food_chocolate Chocolate Bar
item_food_crisps Bag of Crisps
item_food_large_healthy_breakfast Jumbo Bag of Crisps

Glasses

Male

glasses_dark_male Dark Glasses
glasses_eyepatch_male Eyepatch
glasses_half_male Half-Moon Glasses
glasses_monocle_male Monocle
glasses_round_male Round Glasses

Female

glasses_dark_female Dark Glasses
glasses_half_female Half-Moon Glasses
glasses_round_female Round Glasses

Hats

Male

hat_bonnet_male Bonnet
hat_bowler_male Bowler Hat
hat_cap_male Cap
hat_deerstalker_male Deerstalker
hat_fedora_male Fedora
hat_gangster_male Gangster Hat
hat_male_guard Guard's Hat
hat_safari_male Safari Hat
hat_santa_male Santa Hat
hat_top_male Top Hat

Female

hat_ascot_female Ascot
hat_beret_female Beret
hat_farmer_female Farmer Hat
hat_flapper_female Flapper Hat
hat_female_guard Guard's Hat
hat_santa_female Santa Hat
hat_sun_female Sun Hat
hat_turban_female Turban

Outfits

Male

outfit_male_guard Guard Uniform
outfit_male_kilt_# Kilt #
outfit_male_safari_# Safari #
outfit_male_braces_# Slacks & Open Collar #
outfit_male_golf_# Sporty Plus-Fours #
outfit_male_suit_# Suit #

Female

outfit_female_ballgown_# Ballgown #
outfit_female_coat_# Coat #
outfit_female_dress_# Eveningwear #
outfit_female_farmer_# Farmer #
outfit_female_flapper_# Flapper #
outfit_female_guard Guard Uniform
outfit_female_trousers_# Suit #

Magazines

item_car_magazine Classic Motors
item_economic_times Economic Times
item_entertainment_magazine Extra Magazine
item_travel_magazine Far and Away

Medical

item_catheter Catheter
item_colostomy_bag Colostomy Bag
item_sleeping_pills Sleeping Pills
item_prozac Happy Pills
item_deoderant Deodorant

Single Player

special_bible Bible w/ Shank
special_helmet Helmet
special_painting Painting
special_holy_grail Holy Grail

Weapons

weapon_axe Axe
weapon_bbq_fork Barbeque Fork
weapon_baseball_bat Baseball Bat
weapon_blunder Blunderbuss
weapon_candlestick Candlestick
weapon_claymore Claymore
weapon_cleaver Cleaver
weapon_cooking_pot Cooking Pot
weapon_croquet_mallet Croquet Mallet
weapon_crowbar Crowbar
weapon_cut_throat Cutthroat Razor
weapon_flaregun Flare Gun
weapon_frying_pan Frying Pan
weapon_golf_club Golf Club
weapon_hammer Hammer
weapon_hunting_knife Hunting Knife
weapon_katana Katana
weapon_ghurka Khukri
weapon_kitchen_knife Kitchen Knife
weapon_needle Knitting Needle
weapon_letter_knife Letter Knife
weapon_mannequin_arm Mannequin Arm
weapon_paddle Paddle
weapon_pipe Pipe
weapon_pool_cue Pool Cue
weapon_purse Purse Bomb
weapon_revolver Revolver
weapon_rolling_pin Rolling Pin
weapon_scalpel Scalpel
weapon_screwdriver Screwdriver
weapon_shank Shank
weapon_short_sword Short Sword
weapon_shovel Shovel
weapon_spanner Spanner
weapon_syringe Poison Syringe
weapon_syringe_sleep Sleep Syringe
weapon_racquet Tennis Racquet
weapon_tommygun TommyGun
weapon_truncheon Truncheon
weapon_umbrella Umbrella
weapon_walking_stick Walking Stick
weapon_satchel Wallet Bomb
weapon_winchester Winchester
weapon_wrench Wrench
  • SpawnItemGroup
<choices> List of predefined items
  • none
  • bludgeon
  • books
  • box
  • cabin_desk
  • cabin_dresser
  • cabin_wardrobe
  • doctorbag
  • engineering
  • entertainment
  • female_clothing
  • kitchen
  • male_clothing
  • needs_items
  • ration_pack
  • security
  • shoot
  • spawnable
  • suitcase
  • magazines
  • medical
  • weapons
  • SpawnerPickDestType
<choices> Destination type
Literal Value Description
0 All
1 All Same
2 Individual
  • SpawnerPickItemType
<choices> Item type
Literal Value Description
0 Random
1 Cyclic
2 Hybrid
  • DestinationGroup
<string> Destination Group. Multiple spawners can refer to the same group to concatinate their effects
  • SpawnFrequency
<float> Spawn frequency
  • MaxLiveChildren
<integer> Max objects
  • MaxSpawns
<integer> Max spawns
  • NoDuplicateRadius
<float> No duplicate items in specified radius of container
  • RespawnDelay
<float> Respawn delay

Inputs

  • Targetname:

Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster than Kill.
AddOutput  <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
RunScriptFile  <script> (New with Left 4 Dead 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode  <string> (New with Left 4 Dead 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug: In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction  <string> (New with Left 4 Dead 2) !FGD
Execute a VScript function in the scope of the receiving entity.
SetLocalOrigin  <coordinates> (New with Alien Swarm) !FGD
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles  <angles> (New with Alien Swarm) !FGD
Set this entity's angles.
  • EnableDisable:
Enable
Disable
Enable/disable this entity from performing its task. It might also disappear from view.
  • Toggle
Toggle item spawn
  • Spawn
Force item spawn

Outputs

  • Targetname:

OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (Only in the Left 4 Dead series)
This Output fires when the entity is killed and removed from the game.