Re: Making an NPC an ally
Posted by Cheezwedge on
Sun Jan 16th 2005 at 4:17am
27 posts
3 snarkmarks
Registered:
Jan 15th 2005
How can I do this? I've been trying to make one of those giant battle maps, but I can't find out how to make an npc actually be on my team. Any ideas?
Re: Making an NPC an ally
Posted by Yesurbius on
Sun Jan 16th 2005 at 1:12pm
48 posts
5 snarkmarks
Registered:
Dec 31st 2004
If you are talking about citizens as your squad members, then just
create npc_citizen entities and give them a weapon. Upon seeing
Freeman, they will join up.
If you are talking about getting non-citizen npcs to befriend Freeman - its a little more involved:
Create an ai_relationship entity. Position it next to the NPC
that will spawn, and set its radius high enough to encompass the NPC
spawn area.
In the ai_relationship properties there are two target
identiifiers. In one, you enter the name of the npc class,
and in the other you enter 'player' (the player). Make sure you
set it to 'like' and the priority to 90. Be sure to use the class
name (ie. npc_metropolice, npc_combine_s).
You will want multiple relationships, one to 'like' the player, and
then many others to 'hate' all the bad guys. Also, unless you
want these npcs to attack, but not be attacked back, you need to set
the 'reciprocate relationship' to yes.