Please or Register to create posts and topics.

Human NPC follow player

I'm trying to get a custom npc to follow the player however I'm having trouble doing that. I can script everything else with generic_actor including animation scripts however at points I want the NPC to follow the player. is there any way this can be done?

are you actually making real working npcs? Because on portal stories mel they just used props as npcs

:notworthy:

yes as I managed to get a custom model moving about using generic_actor the model can move to points as well as render vcd animations. I'm trying to get it to follow the player as there's no flag option for it on generic_actor. I just wanted to know if there's a way of getting round this like by using a path_corner or something.

If it exists in Portal 2, ai_goal_follow should be what you need:
https://developer.valvesoftware.com/wiki/Ai_goal_follow

raidensnake wrote:
yes as I managed to get a custom model moving about using generic_actor the model can move to points as well as render vcd animations. I'm trying to get it to follow the player as there's no flag option for it on generic_actor. I just wanted to know if there's a way of getting round this like by using a path_corner or something.

Could you make a tutorial?

I can try if this works that is. I'm testing a way of making the npc a companion that can open portals using hidden auto portals timed to an animation done with the Kinect.

well, not if it will be that useful but theres a portal 1 mod called factum solus that uses npcs. It even can create portals (that even you can go in!). You can see the coding to see if you can use it on portal 2.

Skotty wrote:
If it exists in Portal 2, ai_goal_follow should be what you need:<br abp="729">https://developer.valvesoftware.com/wiki/Ai_goal_follow

sorry but it doesn't work for some reason.

Ai_goal_follow is a broken entity in portal 2, as are most others of similar function. There is no simple conventional method for making an npc follow the player in portal 2, your best bet would be to make the npc not follow the player, and instead follow a path the player is likely to go on when the player touches certain triggers, or switch to the portal 1 engine.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!

adding scriptable npc's without using props is possible. I'm also sure I could add talking scripts using the use key. I'm running a tech demo test using vcd scripts.