PDA

View Full Version : Entity Help


Xpiredperson
07-28-2006, 12:46 PM
Hey, ive just started to learn how to use SDK so far im okay with it i can spawn NPCs, Props, Weapons etc..But im having trouble.
I wanna make the NPCs Attack as soon as they spawn so they go straight for the player, (all they do at the Mo is stand about until i walk up to em) I want them to attack as soon as they spawn even if they are a fair distance away.

Anyone tell me how to do this? Please and thanks

wisecode
07-28-2006, 12:55 PM
ai_relationship
Subject: npc_enemyfinder
Target: !player
Disposition: Hate
Start active: Yes

npc_enemyfinder
(Check the flags and properties)
Give it a Squad and Start on.

Flag "Think outside PVS" if you want the NPCs to see around corners, have extended senses.

Xpiredperson
07-28-2006, 01:12 PM
Okay ive done that, the Entities see me but they still just stand there. Is there something more i should do?

MeatPuppet
07-28-2006, 01:34 PM
The npc needs to be in the same squad as the enemy finder. Also, NPCs won't atack the player if there is no path nodes for them to use to navigate. If there are no path nodes they will only atatck if you get close enough and they have line of sight.
You can also use a scripted sentence that tells that NPC to set its goal entity as the player and to run to the player.

Xpiredperson
07-28-2006, 02:40 PM
Sorry to be a major noob but can someone post an example or really dumb it down for me

BloodShed
07-28-2006, 03:17 PM
Did you remember to place info_nodes?
http://developer.valvesoftware.com/wiki/Info_node

Xpiredperson
07-28-2006, 05:26 PM
Alright! I got it to work.
Loads of thanks for the help guys ^_^

wisecode
07-28-2006, 05:43 PM
Good job.
Something you may want to experiment with at times is replacing info_node entities with info_node_hint.
They're like info_node's with AI triggers.

Illustrated here to make Alyx run the Gauntlet:
http://www.sdknuts.com/tutorials/wiseNPC03.asp

p.s. The guys at Ritual will slap me for bringing this up but has anyone noticed now that the SDK is out that Jessica is a modified Alyx?

Michael_Russell
07-28-2006, 06:07 PM
Why would we slap you? Alyx was a skeletal basis (we had permission), but there's a lot of new behavior built in.

wisecode
07-28-2006, 07:02 PM
I didn't mean to understate the great work you guys did.

Several of the Valve guys are friends of mine, I've told them more than once they've got a good attitude about this sort of content sharing, looks like you guys do too.