Spawn Entity At Specific Location in Map

Discussion in 'Mapping Questions & Discussion' started by Mikroscopic, Sep 25, 2016.

  1. Mikroscopic

    aa Mikroscopic

    Messages:
    601
    Positive Ratings:
    605
    How would one spawn an entity such as a tf_projectile at a specific location in the map, as opposed to using ent_create which spawns it at the location of the player's crosshair?
     
  2. Idolon

    aa Idolon the worst admin

    Messages:
    1,506
    Positive Ratings:
    4,329
  3. Mikroscopic

    aa Mikroscopic

    Messages:
    601
    Positive Ratings:
    605
    Yeah, but you have to have an existing entity in hammer to reference for that. Or the console will say:

    Couldn't find any entities named tf_projectile_spellspawnzombie teamnum 2, which point_template spawn_redskeleton is specifying.
     
  4. Fragancia

    Fragancia L2: Junior Member

    Messages:
    83
    Positive Ratings:
    29
    Then make tf_projectile_spellspawnzombie entity in hammer, give it a targetname keyvalue, name it and use it as reference
     
  5. Mikroscopic

    aa Mikroscopic

    Messages:
    601
    Positive Ratings:
    605
    That's the problem. It doesn't exist as an entity in hammer.
     
  6. iiboharz

    aa iiboharz Meme Queen

    Messages:
    707
    Positive Ratings:
    1,030
    That would be because it's not defined in the FGD. It still exists, Hammer just doesn't know what it is in its own little dictionary.

    Just make the reference entity, give it the targetname keyvalue and name it something, voila, you have a reference entity.
     
    • Thanks Thanks x 1
  7. Fragancia

    Fragancia L2: Junior Member

    Messages:
    83
    Positive Ratings:
    29
    trigger_add_or_remove_tf_player_attributes doesn't exist in hammer but that doesn't mean it won't work, valve just haven't updated their FGD for Hammer to show it, that's why Hammer thinks it doesn't exist but the game knows it exists.
     
    Last edited: Sep 26, 2016
  8. Diva Dan

    aa Diva Dan hello!

    Messages:
    831
    Positive Ratings:
    1,369
    That is such a useful entity that the FGD doesn't recognize... Is there a list for things outside of the FGD?
     
    • Like Like x 1
  9. Mikroscopic

    aa Mikroscopic

    Messages:
    601
    Positive Ratings:
    605
    I had no idea you could use entities that hammer didn't recognize, I guess I underestimated the power of the fonz.