make bots killable
#1

First of all sorry for my bad english haha ^^

I got some bots running around in my server, but i want them to be able to die.\
for now i dont see any function that makes them kilable.

so i was thinking of this
Check if player is near...
Check if player is firing
let 1 out of 3 bullets hit or something...

but that would actually be really buggy, isnt there a better way to do this?
Reply
#2

Bots are not normally killable.
The way you suggested, although buggy, and innacurate, is pretty much the only way it can be done atm.

But you can make it better,
If a player is near and is facing the bot, and shoots, then bot takes damage.

Here is an already scripted part of this [FS/INC] Attacking NPCs
The video doesn't show it but he does have it in there that you can kill the npc.
Reply
#3

You could do it(which I'll highly doubt but may not be that unaccurate) by checking your guys angle(front angle) and then checking the nearest player on the players facing-angle. If its a bot and the guy is losing ammo then hes shooting him. Though I am not quite sure how the facing angle will react if you aim to the left or right, anyway, that MIGHT work. I haven't tested it nor I am at all sure about it.
Reply
#4

Yep, the results vary, but from the ones that have been done.
You can make the z plane facing angle work fine, cause you can set the leeway angle.
The issue comes to players z dimension facing, you can shoot below and above the bot and it still counts as a hit.
Reply
#5

It's pretty accurate as long as there arent a couple of bots at a short radius .. lets say 3.0 as example
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)