Walking NPC's?

Avatar
lord_blex
96 Posts
Posted Nov 25, 2012
hello :smile:

I'm completely new to map making, so obviously my first project is something difficult and complex. (Yeah, I don't see the logic behind it either..)
I spent a good day trying to figure out how to add an npc to my map, that can sort of interact with the player (nothing fancy, just walking around and waving). The waving part works just fine, but I can't get it to walk. If I use an actor it doesn't want to move, so I thought I use a dynamic prop, make it move along a track and add a walking animation. But there is no walking animation 0.o (I'm talking about P-Body.) I cycled through the list a couple of times, but couldn't find anything that's working..
Soo, can anyone give me a hand how to do this?

Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Nov 26, 2012
Replied 6 hours later
There definitely is a walking animation for P-Body otherwise the player wouldn't look like they walk.
portalGun_run is the animation you're after, however players models are on a completely different level altogether than static and other dynamic props. Probably the only way in order to make a 'bot' run is to make them an actual npc (generic_actor), but unfortunately I have had no success in trying to get bots walking through the default HL2 entities (ai goals etc.).

In Portal 2 you never see a moving or walking npc so unfortunately Valve never included the support in the game for it. I bet there probably is some way to do so, but I believe it would take a lot of in-depth research or include hacky work-arounds.

Avatar
josepezdj
2,386 Posts
Posted Nov 26, 2012
Replied 33 minutes later
Hmmm... This thread has reminded me of a video I watched like 1 year ago. Please check.

k6JUUOH9O78

I do think it can be achieved somehow as Chicken says by means of hacks and workarounds, since that video was for Portal (HL2), where G-Man was an actual NPC, right? Would it be possible to import the NPC entity into Portal2?

What's more interesting: would it be possible to fake a coop map only to take control of the 2nd player and do as it would be walking and such while the map indeed is a singleplayer one? :lol:

Avatar
FelixGriffin
2,680 Posts
Posted Nov 26, 2012
Replied 2 hours later
I think you can do it with a generic_actor, there was a video about that a while ago.
Avatar
lord_blex
96 Posts
Posted Nov 26, 2012
Replied 1 hour later

ChickenMobile wrote:
There definitely is a walking animation for P-Body otherwise the player wouldn't look like they walk.
portalGun_run is the animation you're after, however players models are on a completely different level altogether than static and other dynamic props. Probably the only way in order to make a 'bot' run is to make them an actual npc (generic_actor), but unfortunately I have had no success in trying to get bots walking through the default HL2 entities (ai goals etc.).

In Portal 2 you never see a moving or walking npc so unfortunately Valve never included the support in the game for it. I bet there probably is some way to do so, but I believe it would take a lot of in-depth research or include hacky work-arounds.

I know that there is a walking animation. The strange thing is that it doesn't work on my prop (it's not even showing as walking in the model browser) while other animations work just fine. Btw I looked into the level where Wheatley destroys a test chamber and you can see P-Body for a second and they were using a prop dynamic as well, so it should be possible to animate it correctly.
Edit: nevermind, it's just a custom animation for that specific scene...

josepezdj wrote:
Hmmm... This thread has reminded me of a video I watched like 1 year ago. Please check.

I do think it can be achieved somehow as Chicken says by means of hacks and workarounds, as that video was for Portal (HL2) where G-Man was an actual NPC, right? Would ot be possible to import the NPC entity into Portal2?

I saw this video with Portal 2 too, they were using a generic_actor, but when I tried to compile the map, it didn't move for me.. I think they were using something other than the Authoring Tools to make/port the map. Which is weird, because it means, that the game supports something that the sdk doesn't..

josepezdj wrote:
What's more interesting: would it be possible to fake a coop map only to take control of the 2nd player and do as it would be walking and such while the map indeed is a singleplayer one? :lol:

That's exactly what I'm trying to do :razz:

Avatar
ChickenMobile
2,460 Posts
Posted Nov 27, 2012
Replied 14 hours later

Try looking at this thread.

post86467.html

Perhaps you can get that example map to work.

Avatar
lord_blex
96 Posts
Posted Nov 28, 2012
Replied 1 day later

ChickenMobile wrote:
Perhaps you can get that example map to work.

No, I can't really make it do anything. :S Thanks though..
Do you have any idea why the walking animations don't work on my prop_dynamic? Is it somehow programmed that they can only work when an npc/player is actually walking?

I guess I'll have to make a custom animation in Blender or something. Never done that.. :razz:

Avatar
FelixGriffin
2,680 Posts
Posted Nov 28, 2012
Replied 2 hours later
Are you sure you have the right model?
Avatar
lord_blex
96 Posts
Posted Nov 28, 2012
Replied 3 hours later

FelixGriffin wrote:
Are you sure you have the right model?

Yeah, I think so.
models/player/eggbot/eggbot

On a sort of related note: how can I import a model and/or animation into Blender? This doesn't seem to work...

Avatar
lord_blex
96 Posts
Posted Nov 30, 2012
Replied 2 days later
Can I set the animation of a generic_actor? It doesn't seem to have a property like that..

Also: is there somewhere a good Portal2-Hammer guide with all the more advanced things (as well)? It's really hard to find out about things if you have to specifically look for everything. (Yes, I know about the dev wiki. It's great, but isn't the best for learning..)

Avatar
CamBen
973 Posts
Posted Dec 02, 2012
Replied 1 day later
sorry for a late reply, but I got slenderman from forest of slender as a working generic_actor. however, you cannot direct them, because the impulse 50 command is obsolete in portal 2.

EDIT: the npc_select and npc_go commands still work, but there is the error (fiddlesticks) sound.

Avatar
lord_blex
96 Posts
Posted Dec 02, 2012
Replied 12 hours later

CamBen wrote:
the npc_select and npc_go commands still work, but there is the error (fiddlesticks) sound.

they don't work for me.. :S
console
] npc_select
lord_blex unpaused the game
Binding uncached material "utilvertexcolorignorez", artificially incrementing refcount
Binding uncached material "
utilwireframe", artificially incrementing refcount
generic_actor:dummy:models/player/eggbot/eggbot.mdl has no sequence for act:ACT_IDLE
] npc_go
lord_blex unpaused the game
No appropriate sequence for arrival activity ?#fbv? ??b (1650522344) (generic_actor: 10/dummy) [1600]
No appropriate sequence for movement activity ?#fbv? ??b (1650522344) (generic_actor: 10/dummy) [1600]
generic_actor:dummy:models/player/eggbot/eggbot.mdl has no sequence for act:ACT_WALK
No appropriate sequence for movement activity ?#fbv? ??b (1650522344) (generic_actor: 10/dummy) [1600]
Bad sequence (-1 out of 111 max) in GetSequenceLinearMotion() for model 'player/eggbot/eggbot.mdl'!
Bad sequence (-1 out of 111 max) in GetSequenceLinearMotion() for model 'player/eggbot/eggbot.mdl'!
Bad sequence (-1 out of 111 max) in GetSequenceLinearMotion() for model 'player/eggbot/eggbot.mdl'!
Bad sequence (-1 out of 111 max) in GetSequenceLinearMotion() for model 'player/eggbot/eggbot.mdl'!
Bad sequence (-1 out of 111 max) in GetSequenceLinearMotion() for model 'player/eggbot/eggbot.mdl'!
Bad sequence (-1 out of 111 max) in GetSequenceLinearMotion() for model 'player/eggbot/eggbot.mdl'!
Bad sequence (-1 out of 111 max) in GetSequenceLinearMotion() for model 'player/eggbot/eggbot.mdl'!
Bad sequence (-1 out of 111 max) in GetSequenceLinearMotion() for model 'player/eggbot/eggbot.mdl'!
Bad sequence (-1 out of 111 max) in GetSequenceLinearMotion() for model 'player/eggbot/eggbot.mdl'!
Binding uncached material "__utilwireframeignorez", artificially incrementing refcount

Avatar
FelixGriffin
2,680 Posts
Posted Dec 02, 2012
Replied 15 minutes later
The model is missing suitable ACTIVITIES.
Advertisement
Registered users don’t see ads! Register now!
Avatar
lord_blex
96 Posts
Posted Dec 02, 2012
Replied 34 minutes later
I know, but how do I go around that? It does have for example an ACT_MP_RUN, but I don't know how to tell it to use that. Not that if I would be sure that it would work.. The model browser doesn't exactly show it as walking (as I was saying earlier). Seriously: if I'm only looking at the little preview window (not the names) there is no walking/running animation for this model. But if I use it as the player model, it works perfectly. This is driving me crazy.. :notwant: