Scripts / A.I. kill count

Author
Message
gd
8
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 23rd Mar 2017 04:31 Edited at: 23rd Mar 2017 04:33
Hi guys, just wanted to add a really basic AI script that can be use with any of the new AI system (Build: 2017.3.10) which will register your kills. I have made the script to only work with the ai_soldier.lua script for this example. You can easily altered this for all the new AI scripts.

The kill score works in two ways.

Normal kills = 1
Headshots = 5

As this uses an exit script to register a kill; I have only added 4 points to the headshot in the script but the total on exit will make 5 kill points.

You can change this to what ever you want but just remember the 1 exit point or whatever your exit point (kill point) will be.

There are two scripts for this example one to display kills (BASIC TEXT ONLY), located bottom left just above the gun info. The other to be added to the AI Soldier in the entity properties instead of the normal ai_soldier.lua script (This will call the AI script anyway). Add both these scripts to your scriptbank folder.

Anyway, time for the script and maybe a YouTube if I get the time

First script to add to a barrel as always active. Filename ai_stats.lua



Second script to add to your AI Soldier entity. Filename ai_soldier_kill_count.lua



That's about it...

gd - Ed.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 SLI mode, Water cooled with an old Victorian cast iron radiator and a industrial leather belt driven fan - That's what you call Steampunked.

Laptop - M17xR3


A new competition running for GG
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 23rd Mar 2017 15:10
Have a kill counter but this is much improved thanks gd
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on

Login to post a reply

Server time is: 2024-12-23 04:24:14
Your offset time is: 2024-12-23 04:24:14