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?
1
Re: Making an NPC an ally
Posted by Yesurbius on Sun Jan 16th at 1:12pm 2005
Posted by Yesurbius on Sun Jan 16th at 1:12pm 2005
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.
[addsig]
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.
[addsig]
1
© Snarkpit.net 2001 - 2023, about us, donate, contact
Snarkpit v6.1.0 created this page in 0.0101 seconds.

Snarkpit v6.1.0 created this page in 0.0101 seconds.

