found out how to get AI in DM work

Pauly

Tank
Joined
Sep 23, 2003
Messages
2,632
Reaction score
0
you have to use ent_fire (npcname) setrelationship (enttoattack) (hate/like) (number).

http://img70.exs.cx/my.php?loc=img70&image=t1rdmbuildingblocksb.jpg
screenshot eraser took of strider impaling an antlion!
Its pretty fun, glitchy thou...
If anyone wants to join- 24.131.126.109 and pass is hl2.net
Its fun to build a fort out of boxes and barrells and bricks and defend it from onslaughts of antlions.
 
So..if I wanted combine to attack an antlion I would type:

ent_fire npc_combine_s setrelationship npc_antlion hate 1?

Waht would I type to make something attack the player?

And thanks!

BTW, Where did u find this out?
 
it would be ent_fire npc_combine_s setrelationship "npc_antlion D_HT 90"
(90 hate) D_HT = hate D_LK = allied.

server should be up now
 
can you give us all the code you typed in the console to get the combine to attack the antion... that would be awesome if ya could :)
 
ent_fire npc_antlion setrelationship "npc_combine_s D_HT 90"
then
use 2 command to make combine fight back
ent_fire npc_combine_s setrelationship "npc_antlion D_HT 90"
command needs to go in place after they are spawned
 
join my server 24.131.126.109 and pass is hl2.net
name of server is paulys AI
 
server crashed., too much strider impaling and warp cannon
Try rejoining from list "Paulys ai VS us
 
Combine won't fire back against the antlions but antlions will kill them
 
I'm also having trouble finding server

make this thread a sticky so we can work on getting the AI working
 
server is back up look in the list for Paulys coop vs us. dm_rally_b2

some people are in
I got striders walkn around and antlions.
 
Heres a little entertaining trick to do:
spawn a bunch of zombies(npc_create npc_zombie)
then spawn a single antlion (npc_create npc_antlion)
make the zombies attack the single antlion (ent_fire npc_zombie setrelationship "npc_antlion D_HT 90")
now the zombies shoudl go running off the the antlion, kill the antlion.
now..for the entertaining part:
after the antlion is dead, the zombies should wander around the map. let them wander for some time before moving on.
create an antlion warrior (npc_create npc_antlionguard)
make the antlion guard attack the zombies (ent_fire npc_antlionguard setrelationship "npc_zombie D_HT 90"
Now the antlionguard should go running around the map, sending defensless zombies flying 100 miles per hour into a wall :LOL:
 
Pauly said:
you have to use ent_fire (npcname) setrelationship (enttoattack) (hate/like) (number).

http://img70.exs.cx/my.php?loc=img70&image=t1rdmbuildingblocksb.jpg
screenshot eraser took of strider impaling an antlion!
Its pretty fun, glitchy thou...
If anyone wants to join- 24.131.126.109 and pass is hl2.net
Its fun to build a fort out of boxes and barrells and bricks and defend it from onslaughts of antlions.


What about making an npc (antlionguard,strider, etc.) attack
players on the server, is there a command for that?
Then you could have players against enemies.
 
Yeah how do we do the strider firing at players one... also whenever i create a strider its underground except for its head... how do i fix this and for it to appear normally?
 
yes you can make any npc attack you
server crashed- back up now striders to kill that work now.
 
Pauly said:
join my server 24.131.126.109 and pass is hl2.net
name of server is paulys AI

Server not found :(
;(
 
Pauly said:
yes you can make any npc attack you
server crashed- back up now striders to kill that work now.
How do you make an npc attack you? and for striders to not be spawned under ground use give. (give npc_strider).
 
Ahh ok..I figured out how to make it attack the player, instead of "<npcgoeshere> D_HT 90" its "player D_HT 90"
 
Someone should make a map like the
"stadium3" map in sven coop. Spawn
a bunch of enemies in a pit (a dozen
antlion guards would do) and have all
players jump in and do battle.
 
Pauly said:
yes you can make any npc attack you
server crashed- back up now striders to kill that work now.


hey what about making a tutorial for all the map makers out there? perhaps it will be stickied!
 
I've gotten bindings to spawn antlion guards and antlions pretty quickly... also headcrabs and such

then i just set their relationship to player d_ht 90 and they'll attack all players like normal

Still learning though how to get the strider to use its cannon and not crashed the server after its done... i've seen it done on another server but i don't know how he did it
 
Ok, I tried it out and some NPCs attack me or other NPCs, but I noticed ant lions and zombies don't do me damage. I can also kill them with 1 single shot (even the antlion guard). Fastzombies do damage however and I need more bullets to kill them. I can't get the combine to attack other NPCs nor me. Does anybody know how to solve this?

Btw, the game seems to crash when using (fast)zombies.
 
Hey guys. Strider using cannon on antlions=crash. dont do that.

and
"player D_HT 90" will make it attack the server admin more dominantly then individual players.
 
affen said:
Ok, I tried it out and some NPCs attack me or other NPCs, but I noticed ant lions and zombies don't do me damage. I can also kill them with 1 single shot (even the antlion guard). Fastzombies do damage however and I need more bullets to kill them. I can't get the combine to attack other NPCs nor me. Does anybody know how to solve this?

Btw, the game seems to crash when using (fast)zombies.
You have to use sethealth to change their health amount. And use something like setdamage to set how much damage they do to you.
 
Pauly said:
You have to use sethealth to change their health amount. And use something like setdamage to set how much damage they do to you.


Could you give an example on how to you sethealth and damage? I tried it, but never got it to work.

I did a ent_info npc_zombie and saw all the commands, but I don't know how to use the stuff it lists.
 
use SK_ commands they say. ill try it in a lil bit.
 
sk_ commands work perfectly.

Only downside is that you have to be server admin to use them :(

sk_antlionguard_dmg_charge 80
sk_antlionguard_dmg_shove 50
sk_antlionguard_health 500
give npc_antlionguard
ent_fire npc_antlionguard setrelationship "player D_HT 40"
 
Sweet! havn't tried them. Thanks bjarke for lettin me know they work. My server is going to be set up pretty soon.
Anyone know how to get combine to work?

Also... I'm going to try and make a cfg with the commands set so you just have to use exec serverai.cfg or something similiar so settings will auto-set.
 
Pauly... how did you get the strider to attack players and not crash server

I have a problem where i assign a name to say, a headcrab (headcrab)... then assign and name to strider (strider)

then do this:

ent_fire strider setcannontarget headcrab ... it shoots and kills him but as he starts floating away the game crashes... everytime... even when i use ones like npc_citizen or npc_combine_s

for it to attack players what "ent" or whatever command is that

or how do you "name" other people playing?

I'm making some scripts on spawning AI w/o having to type in setrelationship crap like you mentioned earlier... or creating a .cfg file with those settings pre-programmed to make it a lot quicker in game

really appreciate on how you got the striders target players
 
Pauly said:
Anyone know how to get combine to work?

In another thread somebody pointed out that the combine AI may be using map nodes for pathfinding, like in HL1, and that the DM maps may not have these nodes. I can get zombies and antlions to run around though, I don't think the AI pathfinding for combine and zombies/antlions would differ. Combine don't walk around, but also don't shoot enemies; they just stand there, turning circles with their arms spread open.

I also noticed that when I set up a dedicated server and launch myself in it I sometimes have difficulties spawning weapons. I sometimes have audio problems too. This is not the case when I directly create a server in HL2DM.
 
I've been killing hoards of antlions and zombies with this, thanks.

I've made some simple .cfg files to fire the setrelationship with binds like...

Code:
bind "j" "npc_create npc_fastzombie; wait; exec zombies_and_headcrabs"
bind "i" "npc_create npc_antlion; wait; exec antlions_and_antlionguards"
bind "h" "npc_create npc_zombie; wait; exec zombies_and_headcrabs"
bind "l" "npc_create npc_headcrab; wait; exec zombies_and_headcrabs"
bind ";" "npc_create npc_headcrab_fast; wait; exec zombies_and_headcrabs"
bind "o" "npc_create npc_antlionguard; wait; exec antlions_and_antlionguards"
bind "n" "give npc_strider; wait; exec combine"
bind "m" "give npc_combinegunship; wait; exec combine"
bind "]" "npc_create_equipment_smg1; wait; npc_create npc_combine_s; wait; exec combine"
bind "'" "npc_create npc_headcrab_poison; wait; exec zombies_and_headcrabs"
bind "[" "npc_create_equipment_smg1; wait; npc_create npc_citizen; wait; exec citizen"
bind "k" "npc_create npc_poisonzombie; wait; exec zombies_and_headcrabs"

And one to enter the health and damage for the monsters and bind to like..

Code:
bind "p" "exec AI_deatharena"

attached are the .cfg files to put in \Steam\SteamApps\your e-mail\half-life 2 deathmatch\hl2mp\cfg

AI_deatharena: this file has all the sk_ commands to edit health and damage are, edit to your taste.
combine: runs setrelationship for combine forces (note: that striders, gunships and combine dont work right now)
citizen: runs setrelationship for citizen (note: like combine citizen don't work)
antlions_and_antlionguards: run setrelationship for antlions and antlionguards
zombies_and_headcrabs: run setrelationship for all zombies and headcrabs.

I have it set up so zombies and headcrabs vs Antlions and Antlionguards vs you.

anyways this is just something to play with.
 
It just sucks at bit, that you have to use the ent_fire command every time you spawn a new monster.

If you i.e. spawned a poisonzombie, and set it to attack the players, and also ent_fire the poisonheadcrabs to attack players, then ever time the poisonzombie throws a headcrab, it counts like a newly spawned headcrab, and you have to ent_fire that to make it attack too.

Does that make any sence?

Oh, and btw, how come I'm not allowed to have two antlionguards on the same map? They run into eachother and one is killed, even tough I set antlion_health to 500.
 
My game crashes all the time. No matter which monsters I spawn :(
 
Game crashes when you kill enemies, remember, sorry for killing you too
 
I am having trouble spawning npcs in HL2DM dedicated, each time I would attempt to npc_create npc_antlion or any npc, it would give me this message about memory:
"The instruction at "0x00000040" referenced memory at "0x00000040". The memory could not be "read".

Then it just terminates all of dedicated server.. I have the latest version, but for some reason I can't spawn any NPCs in Team DM server or DM servers of mine. What is going on? I can spawn NPCs just fine in listen server but not dedicated. Anyway around this? I got fair specs on machine I am running the dedicated, so I don't think it is that... Also I tried spawning NPCs with and with out SAP mod (mini-amx mod) and it still didn't work. Can anyone please help me?
 
Back
Top