[Resource: FGD File] TF2 Spawnables

Discussion in 'Tutorials & Resources' started by PootisSpencer, Oct 6, 2012.

  1. PootisSpencer

    PootisSpencer L1: Registered

    Positive Ratings:
    This is a custom FGD file to add enhanced support for templating spawnable entities.

    it features:
    Headless Hatman
    <-- wildcard means all known projectiles
    and "README" documentation in the properties editor for each entity.

    you can add these entities to your maps with the entity tool;
    MONOCULUS! is listed as 'eyeball_boss', headless_hatman and tf_projectile_* are self-explanitory)

    when used in hammer, you'll see the template's associated model instead of the generic icon model, and gain access to all supported key/value's, inputs, outputs and flags.

    download the zip file here: http://www.dropbox.com/s/v4d3fmxnt183cei/tfspawnables.zip
    unzip it to your SourceSDK folder (%steamdir%\steamapps\%username%\sourcesdk\bin\orangebox\bin
    start hammer
    create a new map (or load an existing map)
    click tools->options
    under the 'Game Configurations' tab, <add> a game data file
    select tfspawnables.fgd
    click all of the "OK" buttons
    add entites with the entity tool

    NOTE: These are only TEMPLATE ENTITIES - they DO NOT spawn themselves.
    in order to get these to spawn:
    add the desired spawnable template entity (Ex. eyeball_boss)
    name your template entity (Ex. tpl_mono)
    add a point_template, name it (Ex. pt_mono) and set one of the template properties to your template entity (Ex. tpl_mono)
    add a env_template_maker, name it (Ex. spawn_mono) and set the point_template property to your point_template entity (Ex. pt_mono)

    add a func_button, set it up as you see fit; add output:
    OutputName: OnPressed
    OutputTarget: spawn_mono
    InputName: ForceSpawn

    The above example will spawn MONOCULUS! at the point where the env_entity_maker was placed (not where the template was placed) every time the button is pressed.

    Also, if you're spawning projectiles, you'll need to parent trigger_hurt, trigger_stun, and other special effects to the template entity in order for them to affect other entities, and each parented item has to be named and added to the point_template properties so that they will spawn with the projectile and MAKE SURE the point_template flag 'Preserve entity names' is UNCHECKED! (if it's left checked, the template will spawn, but only the last spawned template will possess the parented entities)
    • Thanks Thanks x 2
    Last edited: Oct 6, 2012
  2. SoulSharD

    SoulSharD L1: Registered

    Positive Ratings:
    Few more:

    tank_boss : The Tank seen in MVM levels

    Useful I/O:
    output: OnHealthBelow90Percent (90 - 10)
    input: DestroyIfAtCapturePoint
    input: AddCaptureDestroyPostfix
    input: Enable
    input: Disable
    input: SetSpeed
    input: SetHealth
    input: SetMaxHealth

    Works with path_tracks but uncertain how to set up.

    base_boss : Invisible are first but explodes with money if damaged

    (All can be set up in a similar way to aboves)