SF's Hammer Tutorials - NPC Animations

Поділитися
Вставка
  • Опубліковано 4 лют 2025

КОМЕНТАРІ • 258

  • @cerofgmodmachinimas
    @cerofgmodmachinimas 3 роки тому +52

    over 11 years later, and his tutorial still teaches

  • @thesaniks7477
    @thesaniks7477 10 місяців тому +12

    I was 1 year old when this video came out, and now you teached me. Thanks a lot!

    • @Silwerfish
      @Silwerfish  6 місяців тому +2

      Wow, that's pretty cool! :D
      You're welcome!

  • @HazmatHanger
    @HazmatHanger 2 місяці тому +1

    you sir might have the best tutorials in the market because you actually get to the point

  • @Kerify34-h9g
    @Kerify34-h9g 2 місяці тому +3

    after 15 years, this is still helpfull

  • @koldproxy
    @koldproxy 12 років тому +1

    If you are referring to when you start the game, the screen fades from black to clear vision then you go to Map>Map Properties>Level Fade In>Yes.
    A very important section for maps, especially singleplayer ones.

  • @MooseRider
    @MooseRider 15 років тому +1

    Thanks for that! it really helped me understand how to make NPCs work in SDK. I honestly had no clue before this.
    Also, your accent is epic.

  • @bigballer709
    @bigballer709 2 роки тому

    Oh that old hammer and xp UI take me back.. God how I miss the early 2000s

  • @Silwerfish
    @Silwerfish  12 років тому

    Actually, you don't want them to sync up entirely probably, but you can set an output that fires when the combine's animation starts that activates the zombie's animation. Then you just have a delay set on the output that makes the animations sync up.

  • @Silwerfish
    @Silwerfish  12 років тому

    You do that by using info_node_hint nodes, these won't force an NPC to jump somewhere, but it's used by them to know that they CAN jump up or down somewhere. You can read up on info_node_hint on the valve developer wiki.

  • @Silwerfish
    @Silwerfish  15 років тому

    Use the entity tool to create an entity who's name begins with npc_, like npc_citizen or npc_combine_s for example.

  • @Silwerfish
    @Silwerfish  15 років тому

    You can check the flag "Ignore Player +USE", or you could have the door start locked and then unlock it at the same time you open it up.
    I'm glad you found my tutorial useful! :)

  • @Silwerfish
    @Silwerfish  12 років тому +1

    After making him kick down the door like in this tutorial you can give him an aiscripted_schedule that tells him to run to the player. When setting the target that he should run to, put in "!player" without the quotation marks, but with the exclamation mark.
    All you need to do is activate the aiscripted_schedule with an output that is fired from the scripted_sequence when it completes its animation, and that should work!

  • @816nnm
    @816nnm 12 років тому

    I have heard there was something wrong, something happened during the steam update that messed up hammer. Thank you very much for the help so far :D

  • @Silwerfish
    @Silwerfish  12 років тому +2

    You'll first need to set up something like an aiscripted_schedule that tells the crow to go to a specific place that you want it to fly. Then you create a trigger_once brush volume and set it to activate your aiscripted_schedule when the player enters it.

  • @Silwerfish
    @Silwerfish  12 років тому

    Well you can only play one script at a time. If you want to chain scripts, just edit the next script field of each scripted_sequence to be in the order you want. So that the next script field of the first scripted_sequence points to the next one, and that ones field points to the next one and so on.

  • @ChaoticMachinima
    @ChaoticMachinima 13 років тому +1

    Thanks for the tutorial. I wasn't actually planning on doing this, but I'm making a surreal type map to sort of learn different things and I figured this could go in it :D

    • @chenn2749
      @chenn2749 2 роки тому +1

      a tiny bit late but where can I find the map

    • @hPLAYER456
      @hPLAYER456 Рік тому

      yeah wheres it

  • @Silwerfish
    @Silwerfish  15 років тому

    There is actually a prefab showing how this is done.
    *Select your block creation tool or your entity tool.
    * In the right hand menu you will see a drop down menu with the title "Categores:", set that to "Prefabs HL2".
    * Set the "Objects:" drop down menu to "npc_zombie_slump".
    * Press "Insert original prefab".
    Now there should spawn a bunch of objects, place them somewhere in your map, compile and watch the result. Then check out the settings of them in Hammer.
    Hope this helps!

  • @Silwerfish
    @Silwerfish  15 років тому

    Yeah there are pretty many steps involved, but if you compare the effort it takes to what you get in the end, it's totally worth it!
    I am indeed Swedish!
    There can never be enough tutorials, you should make some more! ^^
    Thanks for the comment!

  • @Silwerfish
    @Silwerfish  14 років тому

    @ThomasBorn92 This program is used to make levels for games using the Source engine. Like Half-Life 2, Counter-Strike: Source, Day of Defeat: Source and Team Fortress 2 for example.
    Platinum Arts Sandbox is a totally different program using the Cube2 engine.
    You can import animations into both, but I don't think you can import animations from one of the engines to the other.

  • @Silwerfish
    @Silwerfish  11 років тому

    I remember having a bunch of trouble with this before. You should be able to select the sitting animation as the action animation on the scripted sequence and then set "loop action animation?" to yes.
    If that doesn't do it, check in the flags as well and I think you'll find some flags related to looping animations and such.

  • @Silwerfish
    @Silwerfish  14 років тому

    @liamjhackett this just plays the animation, there's no way to simply change how the animation looks, so you'll have to adjust your environment to fit the animation. You might be able to stop the animation at a good time using inputs and outputs, but that will look very bad.

  • @Silwerfish
    @Silwerfish  14 років тому

    @GamingIsFreaky I think there's a property in the scripted_sequence that decides whether the NPC should face the direction of the scripted_sequence. After making sure that's on, rotate your scripted_sequence to face the direction you want your NPC to face.

  • @Silwerfish
    @Silwerfish  13 років тому

    @Andrewmaster0 to learn stuff I use the interlopers,net website for tutorials, and if I can't find anything there I use Google. Though I've learned most of what I know by just experimenting.

  • @Silwerfish
    @Silwerfish  14 років тому

    @Link98367 You use the ambient_generic entity to create sound. If you have some experience with the input/output system you should be able to figure out how to use it. If not, send me a PM!
    I'll also add this as a tutorial request, thanks for the comment!

  • @Silwerfish
    @Silwerfish  13 років тому

    @LuiDeca That should be quite easy.
    Just set everything up as usual to make the NPC sit. But when it comes to triggering the scripted_sequence, instead of using a trigger_once brush entity you create a point entity called logic_auto. In that entity add an output like this:
    OnMapSpawn
    name_of_your_scripted_sequence
    BeginSequence
    Hope that helps!

  • @Silwerfish
    @Silwerfish  14 років тому

    @Jacc0s To make an NPC say something in the game you'll need to use Face Poser. I have two Face Poser tutorials up right now (both on setting your computer up to use it) with a third one on its way (on how to actually use it).

  • @Silwerfish
    @Silwerfish  14 років тому

    @ThePoliceComedyShow Choreography isn't lip synch though. Face Poser can be used to create lip synch and choreography, but lip synch is not the same thing as choreography.

  • @Silwerfish
    @Silwerfish  15 років тому

    You could do that, that would make him do nothing until you tell him to do something (kick the door in for example), but it's not necessary.

  • @Silwerfish
    @Silwerfish  14 років тому

    @HUMANCONDlTION Hi! It's actually quite simple, you need to add a env_physexplosion entity that you trigger to go off at the same time as the combine plays the animation.
    An env_physexplosion is like a normal explosion, but it's silent, invisible and does no damage, it just pushes stuff around.
    You will need to play around with timings and you might want to make the barrel start with motion disabled and enable it just before you fire the env_physexplosion and stuff like that.
    Hope this helps!

  • @RockBoyy1
    @RockBoyy1 14 років тому

    Thank you very much Silwerfish :) You tutorial helped me !
    Also you were right. I needed HL2 (EP 1 or EP2). Thanks again for posting and I hope you will make more tutorials for the new guys :).

  • @Silwerfish
    @Silwerfish  12 років тому

    To make him not return to his starting position before dying you probably have to set the killing output to start when he starts the animation and then manually set the delay for the output to match with the end of the animation.
    Hm, I guess you want him to kind of fly away a tiny bit as well when he dies maybe? You can use a phys_ragdollmagnet entity to do that, you can read about it on the valve developer wiki.
    Glad I could help!

  • @Silwerfish
    @Silwerfish  13 років тому

    @NoSRESPAWN Thanks for reminding me, I stopped doing the download links because they where too much work compared to the amount of people who used it. I added an annotation saying that there is no download.

  • @Silwerfish
    @Silwerfish  13 років тому

    @cresholicrop I won't make a video on that, but I can explain it briefly: Where you want the player to be when the door closes, create a brush with the trigger texture and make it into a trigger_once entity. In its outputs, add:
    OnTrigger
    [name of door]
    Close
    And then add another one like this:
    OnTrigger
    [name of door]
    Lock
    And that should do it. When the player enters the trigger ,the door will close and lock itself.
    Hope this helps!

  • @Silwerfish
    @Silwerfish  13 років тому

    @YetiSandvichVideos I'm really happy to hear you learned from my tutorial, thanks for letting me know! ♥

  • @YetiSandvichVideos
    @YetiSandvichVideos 13 років тому

    Thank you so much bro! I was struggling for hours. And I couldn't find a good tutorial. But then I watchedy ours twice, and now it works perfectly! You rock! :D

  • @Silwerfish
    @Silwerfish  12 років тому

    This tutorial will help you with part of that, what you need to do is sync up the combine's kick scripted_sequence with the zombie's flinch scripted_sequence (I think there are settings in the scripted_sequence entities to make them sync up).
    And then you need to create an output on the zombie's scripted_sequence that sets the zombie's health to 0 when his animation is over. This will kill him so he'll fall to the ground.

  • @Silwerfish
    @Silwerfish  15 років тому

    Thank you for the requests, they have been added to the request list. Sounds like a cool map, good luck with it!
    If you want stuff to move I can suggest looking for tutorials on func_tracktrain, I couldn't find a good one after a quick search on UA-cam though.

  • @Silwerfish
    @Silwerfish  15 років тому

    @mixterproductions Well they don't do that for me and they should stay for at least a while even if you have that flag unchecked. It might be some setting you've got somewhere that overrides the fade corpses flag. I know there's a convar that can change that, but that setting might also be tied to some graphical settings, I don't know.

  • @Silwerfish
    @Silwerfish  14 років тому

    @FoxY1233 Are you entirely sure you're mapping for HL2, HL2:Ep1 or HL2:Ep2? Those are the only games I know of where the npc_metropolice entity are available.

  • @Silwerfish
    @Silwerfish  13 років тому

    @MethshockFilms He shoots because after he's done what he was told to he returns to normal AI, which includes shooting his enemies, which includes the player. To change the relationships that the player and the different NPCs have, check my tutorial called "NPC Relationships".

    • @RealRoachGaming
      @RealRoachGaming 2 роки тому

      Also there is env_global if the player is non criminal

  • @Silwerfish
    @Silwerfish  14 років тому

    @RickRay9 This can be slightly confusing. I think there is one property and one flag that says something like "Loop in post action" or something like that, try activating those and see if they actually make him loop in the animation.
    If it says "loop in post action", then you would have Idle_To_Sit_Chair as the action animation, and then Sit_Chair (or whatever it might be called) as the post action animation.
    Hope this helps, let me know how it goes (if you didn't solve it in 4 weeks :P )

  • @0XSpartaX0
    @0XSpartaX0 14 років тому

    @Silwerfish Yes but now I did a adoorkick when he is holding a smg and part of the animation is when he runs into the room and I had a next sequence but he teleports back to the first script_sequence then runs to the script

  • @Silwerfish
    @Silwerfish  13 років тому

    @mikilofo90 Yeah it should. The thing you need to refine is just the timing of everything.

  • @Silwerfish
    @Silwerfish  14 років тому

    @dacisco101 Are you sure that the NPC has that specific animation? Have you tried using another animation? If you play your map with developer 1, do you get any error messages in the console when the NPC is supposed to play his animation?

  • @Silwerfish
    @Silwerfish  14 років тому

    @ThePoliceComedyShow Yeah I think it's because Microsoft Speech API 5.0 only works properly on XP, that is used to generate the lip synch.

  • @RickRay9
    @RickRay9 14 років тому

    @Silwerfish Hehe, I fixed it like 3 or 4 weeks ago. ^^
    Thanks anyway for the reply. Hopefully creating a pretty nice map soon.

  • @Silwerfish
    @Silwerfish  12 років тому

    In Steam you go to your game library, and then in the categories you change to "tools" and then you download and install Source SDK. In there you have Hammer.

  • @Silwerfish
    @Silwerfish  13 років тому

    @BigbadProduction You should be able to use the same technique as I use here to make that happen, just select the right animation.

  • @Soulslayerzx
    @Soulslayerzx 14 років тому

    Wow, I watched it with volume and I finally get that the person walks to the scripted_sequence.

  • @Silwerfish
    @Silwerfish  13 років тому

    @TheCreatorOfOwls The different models have their own sets of animations, it IS possible to replace the models but it's probably pretty hard to do and you'd also probably need to make your own mod to do it.

  • @Silwerfish
    @Silwerfish  15 років тому

    Yeah, you could use a logic_auto, but you most often use trigger_once for events (at least I do), so I thought I'd do it that way.
    I like your vid, thanks a lot man! :D

  • @tshai
    @tshai 12 років тому

    it is in Source SDK, you can download that in Steam

  • @adamhxhfan5338
    @adamhxhfan5338 5 років тому +1

    Hey have a question..
    How do you make actions be longer? I made this map and Kleiner (te npc that i'm working with) sat for only about 0.09 seconds. Any help?

    • @adamhxhfan5338
      @adamhxhfan5338 5 років тому

      nevermind you just loop the animation

  • @Silwerfish
    @Silwerfish  14 років тому

    @GameReviewer1987 You mean the name of your entity? I don't think I set a classname in this tutorial, do I? If it's the name of the entity you mean, it's supposed to be red until you hit apply or exit and then enter the properties window for that entity. So the name being red is not the cause of your problem.

  • @carsonfisher681
    @carsonfisher681 12 років тому

    I have a question and i hope it gets answered quickly. What do i do if i want him to kick down a door and then him to run to me? hoping for a quick reply, thanks.

  • @Silwerfish
    @Silwerfish  15 років тому

    Actually, I'd say you get quite a lot back considering the time you invest.
    Mapping is a very time consuming process (like almost any art form), and we mappers basically get everything on a silver plate anyway (imagine having to make that animation).

  • @Silwerfish
    @Silwerfish  15 років тому

    Glad you think so!

  • @Silwerfish
    @Silwerfish  13 років тому

    @superdvdman That's great to hear! I'm going to try to keep creating tutorials for you guys!

    • @LordYvain
      @LordYvain 3 роки тому

      it doesn't work for me!

  • @Silwerfish
    @Silwerfish  13 років тому

    @Andrewmaster0 I haven't made a Hammer tutorial in months and I don't think I'll start again soon, sorry!

  • @Andrewmaster0
    @Andrewmaster0 13 років тому

    Ok:/ but can you tell me where you learned to do all this? If you know of a book or guide or website that covers all the stuff about NPC actions that would be great

  • @Silwerfish
    @Silwerfish  12 років тому

    That character model probably doesn't have the door kick animation, if that is the animation you're trying to use.

  • @flameknight7
    @flameknight7 15 років тому +1

    nice tutorial!
    i have 2 request.
    1. Can you make a platform moving back and forth like as an obstacle? For some reason i cant find proper tutorials on how to do that...
    2. Also, Can you make a tutorial for an animated object like from a trigger or like a ragdoll flying around randomly to scare someone?
    making tutorials for these would be awesome!
    i'm planning to make a scary L4D map that has random events to frighten player :D

  • @Silwerfish
    @Silwerfish  14 років тому

    @0XSpartaX0 Try bringing up the console and writing developer 2 in it, then start your map and when he should do the animation, read what the console says. If some error occurred it will be displayed there.
    Good luck!

  • @spenceriguess
    @spenceriguess 14 років тому

    @Silwerfish oh because on the accursed farms faq it says how ross scott(civil protection)does his videos all within the source sdk so maybe he uses that i guess ill have to try it out for myself

  • @mixterproductions
    @mixterproductions 15 років тому

    omg, how could i forgot? In the Scripted sequences flags, there was an box where i said something like "corpses stay", i checked it and it worked! :D

  • @strvare
    @strvare 15 років тому

    THANKS FOR THE TUTORIAL i haved a lot of use for that

  • @Silwerfish
    @Silwerfish  14 років тому

    @ThePoliceComedyShow Yeah well, as I wrote earlier, lip synching doesn't work on Windows 7.

  • @mikilofo90
    @mikilofo90 13 років тому

    @Silwerfish the same way applies to npc open door? like citizen opens door or combine pushes botton to call down elevator?

  • @Silwerfish
    @Silwerfish  14 років тому

    @MrRichie567 Have you placed info_node entities around so the NPC can navigate?

  • @Silwerfish
    @Silwerfish  14 років тому

    @pr0xincss Ah yeah, if it's too far away you'll need to put info_node entities properly so the NPCs can navigate. Good thing you fixed it!

  • @Silwerfish
    @Silwerfish  15 років тому

    Well you can still make characters talk and interact using the stock animations in an HL2 game by using Face Poser.
    This is much simpler than making your own animations and gives you a lot of freedom.
    The thing is that you need XP for this to work properly, and I have Win7. A tutorial on Face Poser is very requested, but it might take a while for me to find a way around this.

  • @raphu604
    @raphu604 12 років тому

    Thanks a lot for your reply, I tried what you told me, and everything works now... the problem is, the zombie doesn't fall to the ground form where the scripted sequence animation last stopped... it returns to the npc starting position in 1 micro second and then falls in an "unnatural" way to ground... is there a way to fix this? O_o

  • @Andrewmaster0
    @Andrewmaster0 13 років тому

    Could you PLEASE make a video on getting Combine to jump down from walls?

  • @Silwerfish
    @Silwerfish  14 років тому

    @idonthatethissite That's not possible, unless you want to use the same scenes that can be found in the original games, those can be accessed.

  • @Silwerfish
    @Silwerfish  13 років тому

    @HammerTutorialsCH To record the audio and video as well as for editing I use VirtualDub. The codecs I use are Lagarith when recording and Xvid for compressing before uploading to UA-cam.
    VirtualDub isn't an easy program to learn, but once you know how it works its very powerful.

  • @Silwerfish
    @Silwerfish  15 років тому

    @superdvdman Thanks for the comment! I'll never delete it, so don't worry! :)

  • @Silwerfish
    @Silwerfish  13 років тому

    @LuiDeca I've created a series in three parts on that, they're called "Face Poser".

  • @Silwerfish
    @Silwerfish  12 років тому

    Yeah Hammer has support for HL2:ep2. I didn't even know Hammer had a console!

  • @Silwerfish
    @Silwerfish  14 років тому

    @tropicAL509 There should be a "next sequence" property or something like that in the scripted_sequence. Just put the name of the next sequence there and voilá!

  • @Silwerfish
    @Silwerfish  14 років тому

    @tylorh26 That's odd, there should be for every NPC I think.

  • @Silwerfish
    @Silwerfish  14 років тому

    @GENIUSGT You made the choreography using Face Poser? Then... I really don't know how to play that since TF2 doesn't have NPCs. I've made a tutorial series on Face Poser and how to get that into the game, but I use an NPC to play the choreography. And I don't use the entity I explained in this tutorial for that, I use logic_choreographed_scene.
    So I'm afraid I can't help you there. :/

  • @Charon_gmi
    @Charon_gmi Рік тому +1

    I'm glad I use hammer++

  • @Silwerfish
    @Silwerfish  14 років тому

    @0XSpartaX0 Try checking the "Don't teleport NPC on end" spawnflag on the scripted_sequence and see if that helps!
    Let me know if it works!

  • @MrTechnoman6006
    @MrTechnoman6006 13 років тому

    Can you help me, I wanna get my NPC to have a typing animation seqence doesnt work he still does normal activity is there any way i can get my npc to use the typing animation instead of kicking a door with scirpting seqence or any other way? Thanks

  • @mixterproductions
    @mixterproductions 15 років тому

    Well it did work, but the they still fade away directly when i walked into the trigger.. And i have unchecked fade corpses.

  • @Silwerfish
    @Silwerfish  15 років тому

    @MooseRider Haha, thanks! :D
    I'm glad you found it useful.

  • @linusrocknroll
    @linusrocknroll 15 років тому

    Can you make a tut about for instance a vortigaunt typing on his computer or something like that? Other npc's doing other stuff?

  • @Silwerfish
    @Silwerfish  12 років тому

    Just add that scipted_sequence name in the "Next Script" property and he should walk to that scripted_sequence and do it right after he's done with his current one..

  • @tropicAL509
    @tropicAL509 14 років тому

    How do you script a sequence after another? I want to make a combine rappel down and then signal to his squad.

  • @palatence510
    @palatence510 2 роки тому

    I'm from Russia but also that this is a very good tutorial Yes, so like the subscription bell

  • @0XSpartaX0
    @0XSpartaX0 14 років тому

    Help! I tried this but the combine just stands there infront of the door doing nothing!

  • @Bussellancier
    @Bussellancier 3 місяці тому

    Why is the Scripted Sequence Entity able to collide with me?

  • @юбмаД
    @юбмаД 6 місяців тому

    I just wanted to know how to make custom animations...

  • @RickRay9
    @RickRay9 14 років тому

    Hey SF! Tja :)
    Umm, I've got this problem, I made an animation following the tutorial, where a citizen walks right over to a wooden bench, then I used Idle_To_Sit_Chair,
    but I can't get him to stay in the chair, after he sits down he just pops up standing idle. Help! BTW great tutorial :)

  • @Nightmare10311
    @Nightmare10311 4 роки тому

    CAN YOU PLEASE MAKE A VIDEO ON HOW TO MAKE "civilians" ENEMY NPC'S

  • @raphu604
    @raphu604 12 років тому

    how do I make the combine kick a zombie, and the zombie flinches and falls to the ground?

  • @MethshockFilms
    @MethshockFilms 13 років тому

    Why does he try to shoot it? Is it possible to turn metro police and combines friendly, and rebels hostile?

  • @Silwerfish
    @Silwerfish  14 років тому

    @Beatz4theHeatz I used ep2 when making this tutorial so it should work.

  • @YeomanBananaman
    @YeomanBananaman 11 років тому +6

    It didn't work. I tried it over and over, but every time I make it a scripted sequence, the NPC disapeered, when I turned it back, the sequence didn't work!

  • @mixterproductions
    @mixterproductions 15 років тому

    I tried to make a trigger, so once you go in it, two metro polices a little further away will die.. But in the triggeronce i chose kill, and then they just disappeard, if i chose become ragdoll they became ragdolls but faded away directly when they it triggered. I have unchecked the box in both MP:s to fade corpses, but it isnt working :(