Thread: Spawn NPC
View Single Post
Old 05-28-2006, 11:35 AM   #11
PsychosesMan
Newbie
 
PsychosesMan's Avatar
 
Join Date: May 2006
Location: Maryland
Posts: 9
Default Getting Jessica to sort-of follow you

When I played HL2 I used this method to get Alyx as a companion-ish NPC, and I adapted it to Jessica after I beat Emergence. It's the next-best thing to having them follow you, in my opinion.

First, I put the following in a CFG file:
<font class="small">Code:</font><hr /><pre>bind "t" "developer 2 ; npc_select ally_jessica ; npc_go ; developer 0"
bind "y" "developer 2 ; ent_remove ally_jessica ; npc_create npc_jessica ; ent_setname ally_jessica ; developer 0"
bind "u" "developer 2 ; npc_create_equipment weapon_assault_rifle ; developer 0"
bind "i" "developer 2 ; npc_create_equipment weapon_scattergun ; developer 0"
bind "o" "developer 2 ; npc_create_equipment weapon_npc_pistol ; developer 0" </pre><hr />

I then turned on sv_cheats. The way the above script works is that you press Y to spawn/teleport Jessica to the point on the ground that the crosshair is pointing at (it may take a few tries 'cause the engine can be picky about valid locations to spawn her), and pressing T while pointing at the ground should make her try to walk there (again, sometimes takes a few tries, but usually works eventually), and U, I, and O are used to pick what weapon she has when you spawn/teleport her with Y. U is assault rifle, I is shotgun, O is pistol. If you want to remove her completely, point either directly at her or at an invalid spawn location and press Y.

Since she can't climb ladders or jump, you can use Y to teleport her to you once you again reach walkable terrain. In combat, she will move on her own, but won't follow you unless you do the pressing-T thing.

Also, if you didn't infer it from the code, the npc_create_equipment thingies for the weapons are weapon_assault_rifle and weapon_scattergun.

I hope this is helpful to one or more people.
PsychosesMan is offline   Reply With Quote