NPC Team and Move

Need Help? The Day isnt going so well on the Mapping front?
Post Reply
Ozon
Pixel
Posts: 3
Joined: Tue Sep 28, 2010 9:42 pm

NPC Team and Move

Post by Ozon »

How do i make so that the npc's are in a team Red/Blue and not to attack the player in respective team but attack opposite npc team?

And how can i make all npc's standing in a certain location to move to another certain location?
User avatar
Andrax17
npc_combine_elite
npc_combine_elite
Posts: 451
Joined: Wed May 05, 2010 7:11 pm
Location: Finland
Contact:

Post by Andrax17 »

Image
*idk if other npc's have that too..they should*


you can also use ai_relationship to set the npc to love player and/or hate (same goes with npc)

as for the movement, i think this should help a bit http://halfwit-2.com/?page=tutorials&id=22
Ozon
Pixel
Posts: 3
Joined: Tue Sep 28, 2010 9:42 pm

Post by Ozon »

Andrax17 wrote:

you can also use ai_relationship to set the npc to love player and/or hate (same goes with npc)
How do i use the ai_relationship to like players? i suppose it's something in Target(s) ?

The thing i'm doing is that i use npc_maker to spawn an npc using name and squad, but it's hostile against the player.
User avatar
Shana
Lead Developer
Lead Developer
Posts: 2971
Joined: Tue Aug 29, 2006 8:12 pm
Location: Germany
Contact:

Post by Shana »

If you want to make a NPC friendly using ai_relationship, just put in "player" in the target field. Make sure to add a timer or something that applies the relationship again every 5 seconds or so for players that join in later, or else those players would be considered enemies.

And use npc_template_maker or point_template to spawn npcs, it gives you much more control.
Ozon
Pixel
Posts: 3
Joined: Tue Sep 28, 2010 9:42 pm

Post by Ozon »

W0rf0x wrote:If you want to make a NPC friendly using ai_relationship, just put in "player" in the target field. Make sure to add a timer or something that applies the relationship again every 5 seconds or so for players that join in later, or else those players would be considered enemies.

And use npc_template_maker or point_template to spawn npcs, it gives you much more control.
"player" do not work, it do work if i have Teamplay disabled on the map, but doesn't work when its on. isn't there like a "player_blue" or something alike?

EDIT: I finally got it to work using npc_template_maker, thanks.
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

There are one or two issues when adding certain npcs to specific teams. If you can list which npcs you are using I may be able to point the troublesome ones out.

I made a similar style map and I know I used the team options aswell as ai relationships, but I cant remember if I used a 'filter' for the ai relationships.
I'd have to dig up and open the vmf to have a look.

Also for some of you questions about spawning npcs and movement, Tysn wrote some pretty good tutorials found here in this section of the forum, download the examples and study!
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
Post Reply