SF's Hammer Tutorials - NPC Animations 2
Вставка
- Опубліковано 4 лют 2025
- Learn almost all there is to learn about the scripted_sequence entity.
- - - - - - - - -
Rundown
In this tutorial you will learn almost all there is to know about the scripted_sequence entity. You'll for instance learn how to sync up several scripted_sequence entities, how to loop an animation and about the different places you can place animations in.
- - - - - - - - -
List of activities: developer.valve...
- - - - - - - - -
Made by Silverfish
www.precautious...
The aiscripted_schedule entity is used to basically give commands to NPCs. Like "go here", "run there", "attack this guy" and so on. For instance, when all the zombies in Ravenholm spawn they are given the instruction to go towards the player.
The thing that is good about this entity is that the NPC still has its AI on, so it can enter combat and such things if it encounters an enemy on the way to his destination (if you tell him that he's able to do that).
@NoobGuider With "wireframe material", do you mean when you press in the upper left corner of a viewport and this allows you to select "3d wireframe" or something like that as an option?
I'm mapping for Episode 2. Have you tried resetting your game configs and refreshing your SDK (or whatever those two options are, you probably know what I mean)?
@xatic1 If I understand correctly you want the NPC to loop for a while and then stop? If so, try the following in outputs of scripted_sequece:
OnStartSequence, NameOfThisScripted_sequence, Cancel, Delay 10 seconds
And then another output on the same entity that goes something like:
OnSequenceCanceled, NameOfNextScripted_sequence, StartSequence, Delay 5 seconds
I hope that made sense! I'm not sure of the input/output names or even if it works at all (this is how it SHOULD work in my head).
This will come in handy! Oh by the way, what hammer editor engine and game are you running? Mine used to work with hl2 Deathmatch but now it can't find the wireframe material... I checked all the settings and they're fine. Only stopped working a few days ago. And the Counter-Strike engine makes it close down randomly after about 2 minutes of map-making. Any ideas?
@DemonEyeOfFire What you're trying to do should work, I'm not sure what might be wrong as it should be a pretty basic setup. Have you made sure to trigger the ai_relationship so that the relationship is active?
may I ask you what the aiscripted_schedule entity does? :O I was wondering why valve used it so much in their official HL2 maps...
@Silwerfish Nah, I mean when I open it there's three error boxes saying "Missing material: tools/wireframe_editor" or something like that. Then it closes. And it's really irritating because it worked before and then just stopped...
I'll try using Episode 2. Resetting the game configs and the SDK content haven't done anything to help. Neither has uninstalling it then reinstalling it. Ah well, I'll get it to work eventually!
sorry if there is an obvious answer, but how do i make an npc combine police ignore and/or chase but then give up and leave players (like in point insertion)
I think if you check "Allow actor death" it means the game won't automatically go back to you're last save game when they die.
@paintcan176 Try using an ai_goal_police entity together with your npc_metropolice. Search for the entities on the valve developer wiki to find out how they work (can't post links here).
Hey can you help me because I want to make on my map a citizen just to stay seated on a chair and nothing else, how do I do that?
@knecht1911 You should just have to type ai_disable (no number after). This should toggle the AI on and off. So if it says AI disabled in the game, type ai_disable in the console and restart your level.
Dose anyone know how i can make em "pause" or "stop" after an animation? mine just keep looping if i set the loop section? how can i get it to stop at one animation in the end, wait for 5-10 seconds and continue the next script?
@Silwerfish yeah, I will try remaking it... maybe I messed up somewhere along the line.
I need to have a combine shotgun troop shoot a wall, I have tried using a npc_bullseye with an info_target as a parent, and an AI_relationship so the combine will hate the bullseye, yet he still will not shoot!
@Silwerfish thank you!
oh, that is fantastic! Thanks for your help, your channel is awesome! :D
@ThePirishman Really? That might be the case, it was so long since I made this so I can't remember how I came to my conclusion... If you can verify that with a good source I'll annotate it in.
I have found that it can be hard to make this happen. I don't know what my source was on this comment (if I tested it myself or just looked on the dev wiki) since it's so old, but I remember having frustrations over this problem as well.
If you do find a solution, feel free to post it here so others that come can get help!
@DJxXxnfsu It should be like this: Set the post-action idle animation to the animation you want to be repeated. Then check the Loop in Post Idle spawnflag. That will loop the post action idle animation until the script is canceled.
that dosent work i tried it
I don't think there's an animation for that, so you'd probably have to make your own, and that's not a simple task unfortunately.
@NoobGuider How annoying. I haven't heard about that problem before so I'm afraid I can't help. You could try Googling it if you haven't already.
why are people just commenting to reply instead of pressing "reply" lol its not hard
you realize these conversations are nearly 10 years old and youtube was completely different layout wise right?
ye space boyo is right
UA-cam didn't always have a reply function.
@@Grimsikk bruh this was almost 3 years ago and someone already told me that