Adding an AI Enemy to a Map?

Discussion in 'Mapping Questions & Discussion' started by Aqwertybqwerty, Oct 29, 2011.

  1. Aqwertybqwerty

    Aqwertybqwerty L1: Registered

    Messages:
    49
    Positive Ratings:
    2
    Specifically, if I wanted to create a new kind of AI enemy similar to monoculous or the HHH, how would I go about that? Are they hardcoded into the game, or can they be created entirely within hammer?
     
  2. Fr0Z3nR

    aa Fr0Z3nR Creator of blackholes & memes. Destroyer of forums

    Messages:
    6,391
    Positive Ratings:
    4,906
    You can't add a new Mono or HHH at the moment, they are pseudo hardcoded in...

    As in, you can place THEM into your map, but you can't make your own. to act like them, without modding.
     
  3. Aqwertybqwerty

    Aqwertybqwerty L1: Registered

    Messages:
    49
    Positive Ratings:
    2
    Ah, ok.Well, there goes my dream of an alien payload map :p
     
  4. Another Bad Pun

    Server Staff Another Bad Pun bird of prey

    Messages:
    592
    Positive Ratings:
    1,237
    How do you get the HHH into the map anyway? I wanted it in my ctf map, but I didn't know how.
     
  5. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    first you need to place a tf_logic_holiday entity in your map, and set it's holiday to Halloween

    Before you do anything else, you need to put a prop_static of the HHH somewhere in your map, and ambient_generic entites of all his associated sounds. Run your map like that, and what it'll do is create a precache of the HHH and his animations, sounds, etc. If you don't, the map will crash.

    Now once that's done, you need this setup:

    env_entity_maker

    name: maker
    point_template to spawn: hhh_template

    point_template

    name: hhh_template
    template 1: headless_hatman

    headless_hatman (won't be in the fgd, you'll have to create this entity class yourself)

    targetname: headless_hatman

    Now all you need to do is send the entity maker a ForceSpawn output, and you should have a HHH spawning.

    To actually make him move around though, you need a control point in your map (where he will be "attrcted" to), and a nav mesh. To make a nav mesh, turn sv_cheats on and type in console nav_generate
     
    • Thanks Thanks x 3
  6. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
    Well, you could try to create a boss-enemy out of regular entities. A very basic example would be the train/sawblades but with some imagination and a good knowledge of source entities you can make some pretty crazy stuff.
     
  7. Aqwertybqwerty

    Aqwertybqwerty L1: Registered

    Messages:
    49
    Positive Ratings:
    2
    Actually, that's a good idea! I was thinking of a giant "mothership" hovering over the map, and every minute or two it would release 1 or more UFO "drones" that would bomb the map or, ideally, target players.

    Of course, i'm not experienced with those kinds of entities yet, and I can't model at all...
     
  8. Mr. Wimples

    Mr. Wimples L6: Sharp Member

    Messages:
    276
    Positive Ratings:
    202
    Ahh, but where's Quakeman when you need him?
     
  9. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
  10. Faux Rhinoceros

    aa Faux Rhinoceros Also known as Dr. Element

    Messages:
    1,479
    Positive Ratings:
    1,369
    So was i :D

    Absolutely crazy btw