npc_zombie
Post Reply
Quote
Re: npc_zombie
Posted by poisonic on Thu Feb 23rd at 6:13pm 2006


Hello yesterday i found a sollution for DUMB NPC's....... in HL2DM <img src=" SRC="images/smiles/icon_biggrin.gif">

let me explain a bit <img src=" SRC="images/smiles/icon_wink.gif">

Well, the tutorials I found never really told you how to target the player. I finally figured out how to do it, but it took a few extra steps to get the relationships to trigger. So here is how I got it to work:

- Insert an entity called logic_auto
- Have an output OnMapSpawn logic_relay trigger
- Insert a logic_relay
- Have an output OnTrigger logic_timer Enable
- Insert a Logic_timer
- Have an output OnTimer ai_relationship Apply Relationship
- Insert an ai_relationship
Subject: NPC_antlionguard
Target: !player
Start Active: Yes
Reciprical: No
- Insert an NPC (monster) and name it
- Make an output OnDeath Npc_maker spawn
- Make another output OnWake Npc_maker Enable
- Insert an npc_maker
- Make sure the NPC class matches the NPC spawned
- Insert Info nodes everywhere you want your NPC to navigate

and you are almost ready to GO <img src=" SRC="images/smiles/icon_smile.gif">
the npc will come after you now but cant damage you and if you shoud it 1 to its dead......

so we have to make rules like:
-How much health does the NPC have
-How much damage the NPC can cause to !player

for this we need to ad 2 things.....

- point_servercommand
- point_clientcommand

Name then both "client"

now we need to go to our logic_auto we need to add the folowing outputs.....
my output : onmapspawn
target : client
target input : command
parameter : sk_antlionguard_health 5000
delay : 1 second

my output : onmapspawn
target : client
target input : command
parameter : sk_antlionguard_dmg_shove 500
delay : 1 second

my output : onmapspawn
target : client
target input : command
parameter : sk_antlionguard_dmg_charge 500
delay : 1 second

now we have antlion guard with the folowing specs <img src=" SRC="images/smiles/icon_wink.gif">
Health 5000
damage to !player 500 <img src=" SRC="images/smiles/icon_smile.gif">

the Best way for spawning NPC's are after the commands!(using a Trigger_multiple or a button that triggers the NPC_maker to spawn)
if an npc spawns earlier then the commands the NPC will have the standard values.......
causes no damage and is death in 1 hit

good luck and have fun <img src=" SRC="images/smiles/icon_smile.gif"> i hope allot of mappers will be able to create coop maps<html><head><link rel="stylesheet" href="themes/standard.css" type="text/css"></head><body topmargin=2 leftmargin=2>




Quote
Re: npc_zombie
Posted by Sam37 on Thu Feb 23rd at 6:15pm 2006


Havent tested it, but it looks pretty good

One thing though, shouldn't this be in the tutorials section?





Quote
Re: npc_zombie
Posted by poisonic on Thu Feb 23rd at 6:18pm 2006


You are right <img src=" SRC="images/smiles/icon_wink.gif">

its more like a tutorial <img src=" SRC="images/smiles/icon_smile.gif">





Quote
Re: npc_zombie
Posted by Gwil on Sun Feb 26th at 2:56pm 2006


Make a tutorial then!






Quote
Re: npc_zombie
Posted by daz_rich20 on Mon Feb 27th at 3:21pm 2006


i made this post so i could find an old topic since i havent being on in a while

but i still would like u to email me the tut so i dont forget






Post Reply