.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > YappA > Half-Life 2, Source and Source Games
Half-Life 2, Source and Source Games Discuss about Valve's new FPS game and its mods here Half-Life 2

Reply
 
Thread Tools
HL2 AI working in deathmatch! w00t!
Old
  (#1)
MarD
Waypointer/Moderator
 
MarD's Avatar
 
Status: Offline
Posts: 1,184
Join Date: Jan 2004
Location: Canada.. EH!?
Default HL2 AI working in deathmatch! w00t! - 08-01-2005

Heyyo,

With some help of some online files, I've done it, I've gotten HL2 ai working perfectly in HL2DM! (well, the majority at least)

console commands speak better thand paragraphs

npc_create npc_zombie

ent_fire npc_zombie setrelationship "player D_HT 99"

Now the zombie will attack ANY player in sight.

how it works:

ent_fire changes special conditions for any npc. To find out which you can use, type: ent_info *npc name*

Now here's the kicker: the ability to add and remove targets for certain npc's by button pushes! This I had to figure out how to implement by myself since online guides don't exactly guide you.

bind "del" "npc_create npc_antlionguard;wait;ent_setname mardsbrute"
bind "pgup" "ent_setname mardsbrute"
bind "end" "ent_setname target;wait;exec peace"
bind "pgdn" "ent_setname target;wait;exec attack"

now, create cfg's in the cfg folder, and name them 'peace.cfg' and 'attack.cfg'. After that, inside them, add these:

attack.cfg: ent_fire mardsbrute setrelationship "target D_HT 90"

peace.cfg: ent_fire mardsbrute setlreationship "target D_LK 90"

now, when you hit "del", it'll spawn a antlion guard, and set its entity group to mardsbrute, or you can use "pgup" to assign any npc to your mardsbrute entity group.

After that? aim at anything living, and hit "pgdn", and it'll turn that poor target into their sworn enemy.

If you want to give them remorse, hit "pgup" your mardsbrute posse will then act like they don't care for that person... so when they turn their backs? PGDN!

lmao, I'm sooo evul.... bowling for combine's just got better... use an antlionguard

Oh, pgdn, you can multitarget too, just look at each person, and hit pgdn one after another. same goes for peacefullness... but do you really wanna take the fun away from that antlion that just wants to kill? 9_9

WARNING: so far, any npc that uses a gun has not been able to work properly, so sry, no citizen vs combine wars. Same goes for striders and gunships... and from what I've seen, no ichyosaur either.

Also, you can't bind that ent_fire setrelationship stuff to keys... I tried, but since it requires the quotes ("") and so do the keybinds... won't work, you need to make it exec a cfg...

I hope you guys enjoyed this... cause me buds sure the heck diddn't on dm_overwatch when as soon as they went outside the building, or on the top floor, antlionguards were there with a lot of health.

[EDIT]
Oh, and stefan, this works for our cheaply emulated hl2 coop! so just create an autoexec.cfg with all the ent_fire's for all the enemy npc's and you're set.

Oh, and you need sv_cheats 1 to get it to work, I did this:

bindToggle "*" "sv_cheats"

OH!, here's my reference files,http://halflife2.filefront.com/file/...I_Script;35304

thanks to the dude who made it: F2!

Oh, and yes, game always crashes when you try to leave the server, it's a bug in HL2DM...


Later-a-much, and LONG LIVE THE D!,
(Link>>>MarD's Moddin' Site<<<Link) MarD

Rock Hound. (<Link)

Last edited by MarD; 08-01-2005 at 21:01..
  
Reply With Quote
Re: HL2 AI working in deathmatch! w00t!
Old
  (#2)
HangFire
Best served chilled
 
HangFire's Avatar
 
Status: Offline
Posts: 1,005
Join Date: Dec 2003
Location: Saskabush, Canuckada
Default Re: HL2 AI working in deathmatch! w00t! - 08-01-2005

I'll have to try this some time, tanks for the info!



  
Reply With Quote
Re: HL2 AI working in deathmatch! w00t!
Old
  (#3)
Rifleman
This user broke our rules and has been BANNED
 
Status: Offline
Posts: 128
Join Date: Sep 2004
Location: Mars
Default Re: HL2 AI working in deathmatch! w00t! - 08-01-2005

omg , how can you find that out ?!
  
Reply With Quote
Re: HL2 AI working in deathmatch! w00t!
Old
  (#4)
MarD
Waypointer/Moderator
 
MarD's Avatar
 
Status: Offline
Posts: 1,184
Join Date: Jan 2004
Location: Canada.. EH!?
Default Re: HL2 AI working in deathmatch! w00t! - 08-01-2005

Heyyo,

first was that hl2files.com file, then it was a couple opcodes online I saw, then I just put it all together.

Oh, and make sure you exec that skill.cfg file at least once so it loads the default I believe "medium" difficulty health and damage settings.

[EDIT]
BWUAHAHAHAHAHHAAAAAA! striders are mine to command!!!

bind "p" "give npc_strider;wait;ent_setname EvilStrider"
bind "[" "ent_setname EvilStrider"
bind "]" "ent_setname EvilStrider_Target;wait;ent_fire EvilStrider setcannontarget EvilStrider_Target"

Now, you hit "P" to spawn a strider, but first make sure you're noclipping and pretty high above the ground and looking down! If it fails to rename the strider's entity name to evilstrider, aim at it and hit "[". Then? simly aim at your target, and hit "]" and seconds later, once the strider dectects it? BLAM!

Sadly, You can only target 1 guy at a time, and not many like that 1st one, but at least you can destroy people with a strider now.

I'm working on the minigun, its opcode is setminigun target <ent's name> and does the attack sounds and muzzleflash, but won't actually shoot bullets yet... I'm missing something...

An easy way to test ent_fire commands I find is to first aim at the subject you with to test and type something like: ent_setname testsubjectname

and then, use the command ent_fire testsubjectname

and hit space and it'll list all the ent_fire conditonal command stuff.


Later-a-much, and LONG LIVE THE D!,
(Link>>>MarD's Moddin' Site<<<Link) MarD

Rock Hound. (<Link)

Last edited by MarD; 09-01-2005 at 03:29..
  
Reply With Quote
Re: HL2 AI working in deathmatch! w00t!
Old
  (#5)
tripl3z3ro
Member
 
Status: Offline
Posts: 7
Join Date: Jul 2004
Default Re: HL2 AI working in deathmatch! w00t! - 09-01-2005

good job MarD!!

(dont think i'll get into this though...............looks complicated)
  
Reply With Quote
Re: HL2 AI working in deathmatch! w00t!
Old
  (#6)
MarD
Waypointer/Moderator
 
MarD's Avatar
 
Status: Offline
Posts: 1,184
Join Date: Jan 2004
Location: Canada.. EH!?
Default Re: HL2 AI working in deathmatch! w00t! - 09-01-2005

Heyyo,

Heh, thanks.

Got a hallarious one now:

bind ";" "ent_setname burninate;wait;ent_fire burninate ignite"

What this does, anything that can catch fire that you're aiming at gets its entity group changed to burninate, and then sets anything in the entity group burninate on fire.


Later-a-much, and LONG LIVE THE D!,
(Link>>>MarD's Moddin' Site<<<Link) MarD

Rock Hound. (<Link)
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com