AI?

Discussion in 'Mapping Questions & Discussion' started by Dev-Mystery, Jul 28, 2015.

  1. Dev-Mystery

    Dev-Mystery L1: Registered

    Messages:
    21
    Positive Ratings:
    1
    Is there anyway to add classes to the map and make them do stuff like in thunder mountain?
    Is there a way to add weapons to them or make them travel over to different places?
    With out making bots
     
  2. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    931
    Positive Ratings:
    894
    Animations are split up for characters, so if you are trying to make a scout run around with a pistol, nope.avi.

    To add weapons you have to parent a prop_dynamic with the weaponmodel of your choice to the playermodel. You will need to use a logic_auto to tell the weapon that it shall be parented to an attachment point, rather than the dudes origin.
    OnMultiNewRound Pistol01 SetParentAttachment [name of the weapon attachment point]
    You will need hlmv.exe to see the names of the attachment points available to you. Also, in most cases the weapon will look incorrectly rotated. To fix that, the playermodel needs to start out in the reference pose. A logic_auto will after about a second change that to the animation wanted. The weapon needs to be placed accurately where it needs to be in on the reference pose. Instead of using SetParentAttachment, you will need SetParentAttachmentMaintainOffset. The weapon must be parented to the attachment point before the playermodel will be using a different animation. So:
    0.00 seconds in: Scout in reference pose with a pistol in his hand.
    0.50 seconds in: Pistol gets set to the weapon attachment point of the Scout.
    1.00 seconds in: Scout changes animation with the pistol following his hand correctly. If it doesn't look right, you now have the choice of rotating the weapon in hammer until it does look right.
     
  3. Dev-Mystery

    Dev-Mystery L1: Registered

    Messages:
    21
    Positive Ratings:
    1
    Moving about something like cart does
     
  4. LeNitrous

    LeNitrous L2: Junior Member

    Messages:
    57
    Positive Ratings:
    10
    Thundermountain... The swimming classes behind respawn room? If I'm correct, then those are controlled by path_tracks. Correct me please!
     
  5. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,031
    Positive Ratings:
    3,975
  6. Dev-Mystery

    Dev-Mystery L1: Registered

    Messages:
    21
    Positive Ratings:
    1
    When I decompile thunder mountain I can't see dynamic props or spawns and I have everything visible.
     
  7. LeNitrous

    LeNitrous L2: Junior Member

    Messages:
    57
    Positive Ratings:
    10
    Visgroups are your friend.
     
  8. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,031
    Positive Ratings:
    3,975
    I think the swimming is likely just path_track ents. Or maybe the models are parented to a move_linear or something.

    Be sure your playermodels are obviously not other players--TM does this well by putting them VERY far out of the way in places you need to look VERY closely to see.

    Might be worth getting a good layout down first before messing about with tricky details.
     
  9. radarhead

    aa radarhead Hands out ratings like cheap cigars

    Messages:
    1,002
    Positive Ratings:
    533
    Did you have Hammer "fix invalid solids" when you first loaded the map? If so, that's a bug with decompiled maps. Clicking "yes" removed all the entities.
     
  10. Lampenpam

    aa Lampenpam

    Messages:
    991
    Positive Ratings:
    328