Ritualistic Forums

Ritualistic Forums (http://www.ritualistic.com/forums/index.php)
-   SiN Episodes Editing (http://www.ritualistic.com/forums/forumdisplay.php?f=23)
-   -   Spawn NPC (http://www.ritualistic.com/forums/showthread.php?t=17736)

NexusOne 05-21-2006 12:56 PM

Spawn NPC
Hello Folks, I've been playing with the "npc_create" command to try and spawn various characters in the game. I can spawn Jessica on any level (does anyone know if any other characters spawn) but I can't get her to follow me - does an NPC follow behaviour depend entirely on pre-determined paths or is there a console command that can just get the NPC to arbitarily follow the player. Also does anyone knwo if I can set Jessicas agressiveness? or the weapn she spawns with? (so far all I can get is nothing or pistol "npc_create_equipment weapon_npc_pistol")

Many thanks

GUI 05-21-2006 04:20 PM

Re: Spawn NPC
From what I know NPC's only follow you if they have a predetermined path set by the level designer.

wisecode 05-21-2006 06:11 PM

Re: Spawn NPC
The default NPC AI is available for NPC relationships but when you spawn NPCs you can use many NPC debug commands to move them around.
Here's some:

NexusOne 05-22-2006 02:24 PM

Re: Spawn NPC
Thanks for the reply. I've been trying to work with those but I don't know how to select an npc (I've tried pointing at them and typing in the command to the console)? On another topic does anyone know the other weapons that you can give the npc - I've tried weapon_npc_pistol, 'magnum, 'shotgun, 'scatter, 'assault and only pistol works is there a way to list them in the console?


wisecode 05-22-2006 03:13 PM

Re: Spawn NPC
You can select NPCs by class/name, group or crosshair pointer.
The entity names are based on code.
You can't pull up a list but until a FGD is released for SiN you can use GCFScape to browse the prop names and from there have something to go on under the console.

fillit 05-25-2006 10:29 AM

Re: Spawn NPC
But what code do I input behind "npc_create" when i want spawn Jessica or Elexis ? Where did you know the code from? [img]/forums/images/graemlins/confused.gif[/img]

wisecode 05-25-2006 11:45 AM

Re: Spawn NPC
Once a SDK is granted the entity names will be available, for now I simply guess by looking at the NPC prop names.

At the bottom of this page you can see some NPC spawning options:

For Jessica:
Open the console and enter these commands in this order:
sv_cheats 1
npc_create_equipment weapon_npc_pistol
npc_create npc_Jessica

fillit 05-26-2006 02:30 AM

Re: Spawn NPC
"npc_create npc_Jessica" works fine.but "npc_creat npc_elexis" dont. [img]/forums/images/graemlins/frown.gif[/img]

wisecode 05-26-2006 09:37 AM

Re: Spawn NPC
I'm partial to Jessica so that wasn't a problem. [img]/forums/images/graemlins/wink.gif[/img]

From what I can tell, since you don't interact with Elexis, she would only be rendered in the game as npc_Hologram/npc_generic_actor.

However if you use npc_create for Elexis it will cause a game error since no .mdl file is associated.

kill3456 05-27-2006 03:04 PM

Re: Spawn NPC
npc_druglab_jetpack(not sure if right name)

There happy now?

PsychosesMan 05-28-2006 10:35 AM

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.

All times are GMT -5. The time now is 12:54 PM.

Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.